models validate
This commit is contained in:
parent
361153ff39
commit
c74ae2b219
|
@ -70,7 +70,7 @@ OCCUPATION_TYPES = (
|
|||
|
||||
class Occupation(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
occupation_type = models.CharField(choices=OCCUPATION_TYPES)
|
||||
occupation_type = models.CharField(choices=OCCUPATION_TYPES, max_length=64)
|
||||
extra_text = models.BooleanField(default=False)
|
||||
|
||||
def __unicode__(self):
|
||||
|
@ -128,7 +128,7 @@ STATE_CHOICES= (
|
|||
|
||||
class City(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
state = models.CharField(choices = STATE_CHOICES)
|
||||
state = models.CharField(choices = STATE_CHOICES, max_length=255)
|
||||
|
||||
|
||||
from django.contrib.localflavor.in_.forms import INZipCodeField
|
||||
|
@ -137,7 +137,7 @@ class Location(models.Model):
|
|||
lon= models.FloatField(blank=True, null=True)
|
||||
city = models.ForeignKey(City)
|
||||
pincode= INZipCodeField()
|
||||
address= models.TextFie
|
||||
address= models.TextField()
|
||||
|
||||
|
||||
class PersonOccupation(models.Model):
|
||||
|
|
Loading…
Reference in New Issue
Block a user