Ticket #7422: forms.py.diff
File forms.py.diff, 810 bytes (added by , 16 years ago) |
---|
-
forms.py
535 535 >>> f = SongForm(auto_id='%s_id') 536 536 >>> print f['composers'] 537 537 <ul> 538 <li><label ><input type="checkbox" name="composers" value="J" id="composers_id_0" /> John Lennon</label></li>539 <li><label ><input type="checkbox" name="composers" value="P" id="composers_id_1" /> Paul McCartney</label></li>538 <li><label for="composers_id_0"><input type="checkbox" name="composers" value="J" id="composers_id_0" /> John Lennon</label></li> 539 <li><label for="composers_id_1"><input type="checkbox" name="composers" value="P" id="composers_id_1" /> Paul McCartney</label></li> 540 540 </ul> 541 541 542 542 Data for a MultipleChoiceField should be a list. QueryDict and MultiValueDict