When you pass in an instance, when you later use the form.save() method, it will save any new data back to that instance. IE, if you pass in both an instance and POST data, it will basically give you a form that merges the instance data with the POST data, and now you can just save back to the instance.
If you give just initial data, then I believe when you save it just creates a new object, since it is not bound to any existing object. If you give initial and POST data, then it will merge those together (with the post data winning) and create your new object based on that. Margie On Aug 13, 10:01 am, George Laskowsky <georgelaskow...@gmail.com> wrote: > Hi, > > I was wondering about forms (and modelforms), what is the difference > between passing it an object (in the 'instance' attribute) and passing it an > dictionary with the same data (in the 'initial' attribute)? > > Thanks > -- > George Laskowsky Ziguilinsky --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---