Fix phone number field

This commit is contained in:
henu
2017-10-11 21:17:46 +03:00
parent 3061e0a4fe
commit 70ccc88c86
7 changed files with 110 additions and 11 deletions
+6 -5
View File
@@ -154,17 +154,18 @@ class KaehmyForm(MessageParent):
name = models.CharField(_('Name'), max_length=255)
email = models.EmailField(_('Email'))
phone_number = PhoneNumberField(_('Phone number'))
phone_number = models.CharField(
_('Phone number'), max_length=10, default="")
year = models.IntegerField(_('Year'), choices=YEAR_CHOICES)
text = models.TextField(_('Text'), default="", max_length=300)
custom_role_name = models.CharField(
_('Custom role name'), max_length=255, blank=True)
custom_role_is_board = models.BooleanField(
_('Board member'), blank=True)
custom_roles = models.ManyToManyField(
'CustomKaehmyRole', related_name='forms', blank=True)
preset_roles = models.ManyToManyField(
'PresetKaehmyRole', related_name='forms', blank=True)
custom_role_name = models.CharField(
_('Custom role name'), max_length=255, default="")
custom_role_is_board = models.BooleanField(
_('Board member'), default=False)
def __str__(self):
"""Return model info."""