Hi everybody,

I have a problem with denormalizing a m2m field. For several reasons I
want to save a CSV string of all the authors of a text. The authors
are manage in an m2m field to auth.user. The changes are made with the
admin.

First I tried to override the save() method of the model. This didn't
work. Even with first calling save on the parent and doing a fresh
query within the save() function I always get the state of the authors
before the change. After the save operation I have the correct list of
authors in the m2m field but an incorrect serialization in the
denormalized charfield. If I then save again (via the admin interface)
without changing anything it obviously works.

Next I tried using the post_save signal. Same results.

Then someone in the channel suggested to override an admin function
and I tried overriding save_model. Same results here as well.

I don't really know what to do next and I simply don't understand
what's going on. When are these m2m relations updated? Is there
perhaps a seperate signal. Do I somehow need to resync due to internal
caching or something weird like that?
I would be very glad for any suggestions in the toppic! Thanks a lot
in advance.

Beste regards,
Georg Göttlich
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to