Changes between Version 2 and Version 3 of Ticket #24541, comment 4


Ignore:
Timestamp:
Mar 26, 2015, 9:30:13 AM (9 years ago)
Author:
Johannes Maron

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24541, comment 4

    v2 v3  
    1010    PollFormSet = modelformset_factory(Poll, fields='__all__')
    1111    if request.method == 'POST':
    12         formset = PollFormSet(request.POST, initial=[{'question': 2}, {'question':4}])
     12        formset = PollFormSet(request.POST, initial=[{'question': 'Foo'}, {'question': 'Bar'}])
    1313        if formset.is_valid():
    1414            obj_list = formset.save()
Back to Top