On Fri, 2008-01-04 at 09:51 -0800, Michel Thadeu Sabchuk wrote:
> Hi guys,
> 
> I´m using the newforms-admin branch and I have one thing to note about
> modelforms. I used a revision (I can´t tell what) and to instanciate
> the form I need to do:
> 
> edit_form = ModelForm(request.POST, instance=instance_object)
> create_form = ModelForm(request.POST)
> 
> Now the revision changed to:
> 
> edit_form = ModelForm(instance_object, request.POST)
> create_form = ModelForm(Instance(), request.POST)
> 
> I don´t want to be the boring but, why I need to specify instance as
> the first argument? Isn´t the form related to the model? I liked the
> older method, so I can set the instance to none and spend less
> lines ;)

Sounds like your checkout is a little behind the tip of that branch. As
of [6955] (the latest newforms-admin commit), the branch includes
changes from trunk up to [6952]. That means it includes changeset
[6915], which moves the instance argument out of the first position in
ModelForms.

Short version: if you're using newforms-admin checkout prior to December
4, update so that you have the right ModelForms syntax.

Regards,
Malcolm

-- 
Experience is something you don't get until just after you need it. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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