I have a form like this:
class My_Form(ModelForm):
class Meta:
model = My_Class
fields = (\'first_name\', \'last_name\' , \'address\')
Guess your model is like this:
class My_Class(models.Model):
address = models.CharField()
Your form for Django version < 1.8:
class My_Form(ModelForm):
address = forms.CharField(required=False)
class Meta:
model = My_Class
fields = ('first_name', 'last_name' , 'address')
Your form for Django version > 1.8:
class My_Form(ModelForm):
address = forms.CharField(blank=True)
class Meta:
model = My_Class
fields = ('first_name', 'last_name' , 'address')