2007/9/13, Collin Grady <[EMAIL PROTECTED]>:
> As such, it's impossible to add an m2m link until the object is saved
> - this means that admin's code can't possibly set the m2ms up in time
> for save() to get them, and there is no event or function to hook
> where you can get it.
2007/9/13, Collin Grady <[EMAIL PROTECTED]>:
>
> While I believe you were the one asking this in IRC, I will answer
> here for anyone else stumbling across this :)
>
> ManyToManyField entries are just two IDs - one for each object.
>
> As such, it's impossible to add an m2m link until the object is saved
> - this means that admin's code can't possibly set the m2ms up in time
> for save() to get them, and there is no event or function to hook
> where you can get it.
The object isnt' saved in (1):
def save(self):
print "Before save"
super(Person, self).save() # Call the "real" save() method #(1)
print "After save"
After that super().save() the object should be saved, or not?
http://www.djangoproject.com/documentation/models/save_delete_hooks/
--
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net - Il mio sito personale
http://www.soasi.com - Sviluppo Software e Sistemi Open Source
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---