Code

Ticket #16467: formset_example.diff

File formset_example.diff, 689 bytes (added by teraom, 3 years ago)
Line 
1Index: docs/topics/forms/formsets.txt
2===================================================================
3--- docs/topics/forms/formsets.txt      (revision 16544)
4+++ docs/topics/forms/formsets.txt      (working copy)
5@@ -59,10 +59,10 @@
6 example::
7 
8     >>> ArticleFormSet = formset_factory(ArticleForm, extra=2)
9-    >>> formset = ArticleFormSet(initial=[
10-    ...     {'title': u'Django is now open source',
11-    ...      'pub_date': datetime.date.today()},
12-    ... ])
13+    >>> formset = ArticleFormSet(initial={
14+    ...      'title': u'Django is now open source',
15+    ...      'pub_date': datetime.date.today(),
16+    ... })
17 
18     >>> for form in formset:
19     ...     print form.as_table()