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?
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))
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
3 matches
Mail list logo