Changes between Version 1 and Version 2 of Ticket #24541, comment 4
- Timestamp:
- Mar 26, 2015, 9:29:28 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24541, comment 4
v1 v2 10 10 PollFormSet = modelformset_factory(Poll, fields='__all__') 11 11 if request.method == 'POST': 12 formset = PollFormSet(request.POST, init al=[{'vote': 2}, {'vote':4}])12 formset = PollFormSet(request.POST, initial=[{'question': 2}, {'question':4}]) 13 13 if formset.is_valid(): 14 14 obj_list = formset.save()