I have some code that modifies related items when a model is saved. I've
tried this by both using a post_save signal and by putting the code
directly in a save() override.
When I save an instance in the Django admin, it never works.
When I save an instance in ./manage.py shell it always works.
Why would this be?
For instance, if my code (in the save override) is this:
self.some_m2m_field.clear()
self.some_m2m_field.add(this_thing)
Then if I go into the admin and save the instance, this_thing is not
attached to the instance. But if I do a .save() in the shell and check
it has been assigned.
I assume I'm missing something fundamental about this.
Thanks,
Shawn
--
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.