Ticket #7422: forms.py.diff

File forms.py.diff, 810 bytes (added by Adrian Ribao <aribao@…>, 7 years ago)

Patch for the unit test

  • forms.py

     
    535535>>> f = SongForm(auto_id='%s_id')
    536536>>> print f['composers']
    537537<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>
    540540</ul>
    541541
    542542Data for a MultipleChoiceField should be a list. QueryDict and MultiValueDict
Back to Top