Q:

Saving MultipleChoiceField in django

I am trying to save a MultipleChoiceField in Django.
model.py
choices_for_field  = 
    (('A','A'),
     ('B','B'),
     ('C','C'),
     ('D','D'),)

class names(models.Model):
    c_name = models.CharField(max_length=50, null=False, blank=False, choices=choices_for_field)

class formForm(ModelForm):    
    c_name = forms.MultipleChoiceField(label='alphabets', choices=choices_for_field, widget=CheckboxSelectMultiple)

When I am saving this, I am getting an error as 'Not a valid Choice'. I don't know where I am going wrong. I have checked all other questions related to this. But nothing has worked for me. Can anybody help me.
views.py
bf = formForm(request.POST)
    if bf.is_valid():
        temp = bf.save(commit=False)
        temp.stud_user_id = userid
        temp.save()

A:

You can't save a multiple choice field to a CharField. A CharField is a single element. A MulitpleChoiceField is, well, multiple.
What I suspect you want to do is to concatenate a series of choices to a single (comma-separated?) value in a CharField. You could do that with a standard forms.TextField (using a MultipleChoiceWidget) with a custom clean method that does the concatenation, but you'll need to remove the choices attribute from the destination CharField.

