I want to use CheckboxSelectMultiple (checkbox) under modelform
instead of default ModelMultipleChoiceField settings.

my codes are as follows:


class Form(ModelForm):

        def __init__(self, *args, **kwargs):

            super(Form, self).__init__(*args, **kwargs)

 
self.fields['condition'].widget=forms.CheckboxSelectMultiple



        class Meta:
            model=Post
            fields=('post_type', 'title', 'body', 'condition')


I got the error like:

Exception Type:         AttributeError
Exception Value:        type object 'CheckboxSelectMultiple' has no
attribute 'attrs'


I am total lost on this problem. anyone may help me out? Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to