mirror of https://github.com/django/django.git
Fixed #5397 -- Fixed typo in docs/newforms.txt example. Thanks, zhaoz@u.washington.edu
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
863ee0ef89
commit
ed5a91f428
|
@ -1887,7 +1887,7 @@ field on the model, you could define the callback::
|
|||
... else:
|
||||
... return field.formfield(**kwargs)
|
||||
|
||||
>>> ArticleForm = form_for_model(formfield_callback=my_callback)
|
||||
>>> ArticleForm = form_for_model(Article, formfield_callback=my_callback)
|
||||
|
||||
Note that your callback needs to handle *all* possible model field types, not
|
||||
just the ones that you want to behave differently to the default. That's why
|
||||
|
|
Loading…
Reference in New Issue