Django BooleanField as a dropdown
<p>Is there a way to make a Django BooleanField a drop down in a form?</p>

<p>Right now it renders as a radio button. Is it possible to have a dropdown with options: 'Yes', 'No' ?</p>

<p>Currently my form definition for this field is:</p>

<pre><code>attending = forms.BooleanField(required=True)
</code></pre>

<p>I believe a solution that can solve your problem is something along the lines of this:</p>

<pre><code>TRUE_FALSE_CHOICE = (
    (True, "Yes"),
    (False, "No")
}

boolfield = forms.ChoiceField(choices = TRUE_FALSE_CHOICES, label="Some Label", 
                              initial='', widget=forms.Select(), required=True)
</code></pre>

<p>Might not be exact but it should get you pointed in the right direction.</p>

python django