On Thu, 2008-04-24 at 03:03 -0700, sector119 wrote: > Why this code allways create new objects and never update them!? How > to update objetcs, not create them using form.save() > > Model PK is AutoField. When it not autoincrement field everything > works fine!
At no point in your code are you giving it any information about what existing model instance you would want to be updated. If you want an existing instance to be updated, you must pass it in when you create the form instance (you do this in the non-POST path, but not in the POST path). Regards, Malcolm -- Everything is _not_ based on faith... take my word for 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 -~----------~----~----~----~------~----~------~--~---