Ticket #16467: formset_example.diff
File formset_example.diff, 689 bytes (added by , 13 years ago) |
---|
-
docs/topics/forms/formsets.txt
59 59 example:: 60 60 61 61 >>> ArticleFormSet = formset_factory(ArticleForm, extra=2) 62 >>> formset = ArticleFormSet(initial= [63 ... {'title': u'Django is now open source',64 ... 'pub_date': datetime.date.today() },65 ... ])62 >>> formset = ArticleFormSet(initial={ 63 ... 'title': u'Django is now open source', 64 ... 'pub_date': datetime.date.today(), 65 ... }) 66 66 67 67 >>> for form in formset: 68 68 ... print form.as_table()