Re: Can I add custom field to ModelForm?

2011-01-08 Thread Brian Neal
On Jan 7, 8:55 am, robos85 wrote: > Is it possible to add field (I want it to be visible in generated form and > after post) to form which is not included in Model? I need it to make a > check after form.is_valid(), but this field won't go to DB. > > If yes - how can I do that?

Re: Can I add custom field to ModelForm?

2011-01-07 Thread satyandra babu
Hi, i think form choice will work in this case. http://docs.djangoproject.com/en/dev/topics/forms/modelforms/ class AuthorForm(forms.Form): name = forms.CharField(max_length=100) title = forms.CharField(max_length=3, widget=forms.Select(choices=TITLE_CHOICES))

Can I add custom field to ModelForm?

2011-01-07 Thread robos85
Is it possible to add field (I want it to be visible in generated form and after post) to form which is not included in Model? I need it to make a check after form.is_valid(), but this field won't go to DB. If yes - how can I do that? -- You received this message because you are subscribed to