Permalink
Browse files

fix indent + default value for iso2

  • Loading branch information...
1 parent ef816f0 commit 7003d8e9e88a124e080ac64f52e52736d22724de @areski areski committed Aug 18, 2012
Showing with 18 additions and 17 deletions.
  1. +18 −17 country_dialcode/models.py
View
@@ -15,16 +15,17 @@ class Country(Model):
These are the countries and their country code, country prefix, name
For instance : USA, 1, United States
"""
- countrycode = models.CharField(max_length=3,
- verbose_name=_('ISO alpha-3'),
- help_text=_("Enter Country Code. e.g. USA - ISO alpha-3"))
- iso2 = models.CharField(verbose_name=_('ISO alpha-2'), max_length=2)
+ countrycode = models.CharField(max_length=3,
+ verbose_name=_('ISO alpha-3'),
+ help_text=_("Enter Country Code. e.g. USA - ISO alpha-3"))
+ iso2 = models.CharField(verbose_name=_('ISO alpha-2'),
+ max_length=2, default='')
countryprefix = models.IntegerField(max_length=12,
- verbose_name=_('Prefix'),
- help_text=_("Enter Country Prefix. e.g. 1"))
+ verbose_name=_('Prefix'),
+ help_text=_("Enter Country Prefix. e.g. 1"))
countryname = models.CharField(max_length=240, verbose_name=_('Name'),
- help_text=_("Enter Country Name. e.g. United States"))
-
+ help_text=_("Enter Country Name. e.g. United States"))
+
class Meta:
db_table = 'dialcode_country'
verbose_name = _("Country")
@@ -42,19 +43,19 @@ class Prefix(Model):
For instance : 44 ; United Kingdom
"""
prefix = models.IntegerField(primary_key=True,
- help_text=_("Enter Prefix"))
+ help_text=_("Enter Prefix"))
destination = models.CharField(max_length=180,
- help_text=_("Enter Destination"))
+ help_text=_("Enter Destination"))
country_id = models.ForeignKey(Country,
- db_column="country_id", null=True,
- blank=True,
- verbose_name=_("Country Code"),
- help_text=_("Select Country"))
+ db_column="country_id", null=True,
+ blank=True,
+ verbose_name=_("Country Code"),
+ help_text=_("Select Country"))
carrier_name = models.CharField(max_length=180,
- help_text=_("Enter Carrier Name"))
+ help_text=_("Enter Carrier Name"))
prefix_type = models.IntegerField(choices=prefix_type_list, default=1,
- verbose_name=_('Prefix Type'),
- help_text=_("Select Prefix Type"))
+ verbose_name=_('Prefix Type'),
+ help_text=_("Select Prefix Type"))
class Meta:
db_table = 'dialcode_prefix'

0 comments on commit 7003d8e

Please sign in to comment.