My model has quite a few logical fields. I split them into 3 sets, which I show as MultipleChoiceField with the modified CheckboxSelectMultiple .
Now I need to save this data back to the database. that is, I need to split the data returned by one widget into several Boolean columns. I think this is suitable for the save() method, no?
Question: How do I do this? Something like that?
def save(self, commit=True):
If so ... how to set values?
self.fields['my_field'].value = 'my_flag' in self.cleaned_data['multi_choice']
Or something? Where is all the data stored?
django django-forms
mpen Oct 13 '10 at 19:33 2010-10-13 19:33
source share