The save() method on a form doesn't actually exist in every case.  If
you use the helper functions like form_for_model and
form_for_instance, they will magically create it for you.  The form
builders make sure there is enough info in the form (hidden or
otherwise) to tie it to a model instance.   When you do a custom form
all that's up to you.  In Django forms and models are not tied to each
other directly, unless you use something like the form_for_x functions
to tie them together (or a custom save method has the same purpose).

You don't even have to use any save() method.  All of the form data
resides in form.cleaned_data, which is just a dictionary.  You can
pull the values from there in your view and assign them to model
attributes in your view and then do model.save().  That is all a
custom save() method typically does, it just keeps that code out of
the view.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to