Fixed #16467 -- Corrected formset code example. Thanks, teraom.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16564 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
fab483971c
commit
8ac23178ad
|
@ -59,10 +59,10 @@ number of forms it generates from the initial data. Lets take a look at an
|
||||||
example::
|
example::
|
||||||
|
|
||||||
>>> ArticleFormSet = formset_factory(ArticleForm, extra=2)
|
>>> ArticleFormSet = formset_factory(ArticleForm, extra=2)
|
||||||
>>> formset = ArticleFormSet(initial=[
|
>>> formset = ArticleFormSet(initial={
|
||||||
... {'title': u'Django is now open source',
|
... 'title': u'Django is now open source',
|
||||||
... 'pub_date': datetime.date.today()},
|
... 'pub_date': datetime.date.today(),
|
||||||
... ])
|
... })
|
||||||
|
|
||||||
>>> for form in formset:
|
>>> for form in formset:
|
||||||
... print form.as_table()
|
... print form.as_table()
|
||||||
|
|
Loading…
Reference in New Issue