在Django模型中存储电话号码的好方法 [英] Good way to store phone numbers in django models

查看:43
本文介绍了在Django模型中存储电话号码的好方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建模型,其中一个字段用于输入电话号码.在Django模型中保留电话号码的最佳方法到底是什么?

I was creating a model, and one of the fields is for a phone number. What exactly would be the best way to hold a phone number in a django model?

什么才能提供最佳功能?

What would allow for the best functionality?

推荐答案

使用此程序包 https://github.com/stefanfoulis/django-phonenumber-field 只需使用pip进行安装

Use this package https://github.com/stefanfoulis/django-phonenumber-field just install it with pip

这篇关于在Django模型中存储电话号码的好方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆