mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Fixed typo in docs/topics/forms/modelforms.txt
This commit is contained in:
parent
c2bfd76ec3
commit
19e41a9799
@ -687,7 +687,7 @@ specifying an ``initial`` parameter when instantiating the form. Initial
|
|||||||
values provided this way will override both initial values from the form field
|
values provided this way will override both initial values from the form field
|
||||||
and values from an attached model instance. For example::
|
and values from an attached model instance. For example::
|
||||||
|
|
||||||
>>> article = Article.objects.get(pk1=)
|
>>> article = Article.objects.get(pk=1)
|
||||||
>>> article.headline
|
>>> article.headline
|
||||||
'My headline'
|
'My headline'
|
||||||
>>> form = ArticleForm(initial={'headline': 'Initial headline'), instance=article)
|
>>> form = ArticleForm(initial={'headline': 'Initial headline'), instance=article)
|
||||||
|
Loading…
Reference in New Issue
Block a user