1
0
mirror of https://github.com/django/django.git synced 2025-01-20 23:29:17 +00:00

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:
Adrian Holovaty 2007-09-13 14:38:25 +00:00
parent 863ee0ef89
commit ed5a91f428

View File

@ -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