On Thu, 2008-04-24 at 04:21 -0700, sector119 wrote:
> ok I've added instance=object!
> 
> is it ok, that when I change PK value and call form.save() it create
> new item, and not just update PK value on already existen item if PK
> is _not_ AutoField?

The primary key identifies which row in the database table to update. So
if you change that value, it is definitely going to either add a new row
or change some other row.

>  if it is ok, then how to change value of PK field
> if it is not  AutoField? :)

Save the new model instance and delete the old one would be one
possibility if you wanted to do it entirely from Python. Or use raw SQL.

Regards,
Malcolm

-- 
What if there were no hypothetical questions? 
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