I've been trough the save() as documented here:
http://code.djangoproject.com/wiki/RemovingTheMagic#Overridingsaveanddeletemodelmethods

But, this  does not work for fields having a ManyToMany relation.
If you take the example with "publication" and "article" as described
here: http://www.djangoproject.com/documentation/models/many_to_many/

If you put the following into the "Article" class:
    def save(self):
        print "Before",self.publications.all()
        super(Article, self).save()
        print "after",self.publications.all()

You'll see that you'll always see the same result before and after the
save.
(standard fields are yet working correctly)
It seems that the manytomany related data are saved after the complete
execution of save().
I'm using revision 3275
In my case this is annoying.



Any ideas for a pre-save and post-save for all data (even manytomany)?


Thanks


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

Reply via email to