Django应用程序提供拨号代码和国家代码
django-country-dialcode-sb的Python项目详细描述
主要代码取自http://github.com/Star2Billing/django-country-dialcode
此django应用程序提供拨号代码和国家/地区数据,以便在django应用程序中重用。
安装
安装Django国家/地区拨号代码:
python setup.py install
设置
在settings.py文件中:
INSTALLED_APPS = INSTALLED_APPS + ('country_dialcode',)
用法
在您的型号中添加以下内容
dialcode = models.ForeignKey(Prefix, verbose_name=_("Destination"), null=True, blank=True, help_text=_("Select Prefix"))