Tuesday, August 2, 2011

Re: add a field to a form that isn't in a model

Just add the fields to your ModelForm and then do whatever you want in
your save() override.

The example you found has extra code the author added to the model, but
there's nothing "standard" there. It's just something that suited that
use-case.

Remember that all of Django is "just" Python, so there's no special way
you have to do it.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment