Thanks, are they also any example of the case of form_for_model (as I am assuming the above is only with respect to form_for_instance)
Thx. D. On Sep 10, 9:32 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 10, 8:56 am, David <[EMAIL PROTECTED]> wrote: > > > whereas once you had > > > p = get_object_or_404(Person, pk=pID) > > MyForm = forms.form_for_instance(p) > > f = MyForm(request.POST.copy()) > > > how on earth do you do it now? > > I've tried simply f = MyForm(request.POST.copy()) where MyForm is > > previously defined as a class with model=Person, but then django > > thinks its a new entry rather than an update (have unique) how can I > > specify that this is an update and linked to 'p'? > > > I can't find a straight forward example.... yelp! > > f = MyForm(request.POST, instance=p) > > Seehttp://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the-sav... > -- > DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---