Sunday, April 22, 2012

ModelMultipleChoiceField in edit form

Hi,

I have a django admin form where in i have overriden two fields widgets to display in ModelMultipleChoiceField

ie

attributea = forms.ModelMultipleChoiceField()
attributeb=forms.ModelMultipleChoiceField()

now i when i click save and add another data will be saved to database and will be redirected to edit form.

But in the edit form those 2 attributes are not selected by default . ie i need to select it again and click save. it is not saving the state for the two attributes which have been overridden ?

Is there a way to do this ?

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