Friday, April 1, 2011

Accessing object ID in override of model save()

Is there a way to access what the ID of a new object being created in
the admin?

so if you wanted to ovveride the save and then do a get_or_create on
another object in another model with a foreignkey back to the object
you are creating you would have that ID at your disposal.

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment