Monday, August 29, 2011

Values for ManyToMany-field set in code not visible in admin

I got a model with a ManyToMany-field which is set/populated when
saved based on other fields. It can be set in the admin as well. When
this field is set in code, and I can see the correct values have been
set when getting the object from the database, the correct values in
the ManyToMany-field in the change_form for the model are not
selected. Selected the values for the ManyToMany-field in the admin
manually is saved ok and display ok. What's the difference between
setting fields like this in code and doing it in the admin?

--
Mvh/Best regards,
Thomas Weholt
http://www.weholt.org

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