Why don't manytomany fields save like this?
112 af = editform.save(commit=False)
113 af.level_1 = level_1
114 af.level_2 = level_2
115 af.level_3 = level_3
116 af.level_4 = level_4
117 af.save()
alternatively is there a way to insert the af.level(s) into the QueryDict in the POST and therefore not need the commit=False?
-- 112 af = editform.save(commit=False)
113 af.level_1 = level_1
114 af.level_2 = level_2
115 af.level_3 = level_3
116 af.level_4 = level_4
117 af.save()
alternatively is there a way to insert the af.level(s) into the QueryDict in the POST and therefore not need the commit=False?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a1439ecb-524b-4b35-bdd6-ec73391413e7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment