new_obj = form.save()
new_objects_id = new_obj.id
hth,
-richard


On 6/23/08, Calvin Dodge <[EMAIL PROTECTED]> wrote:
>
>
> I need to get the id of a record after saving it with form.save(). I'm
> not seeing this described in the docs, and haven't dredged anything up
> by searching this group.
>
> Is it possible to get the id of the record from a just-saved form?  Or
> do I have to search for the record, and hope I don't get more than 1
> record in return?
>
> Calvin Dodge
> >
>

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