Fixed #7292 -- Removed reference to form_for_model in the form_preview docs. Thanks to programmerq for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7675 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e4fc327890
commit
b3653db4f0
|
@ -69,12 +69,10 @@ How to use ``FormPreview``
|
||||||
|
|
||||||
...and add the following line to the appropriate model in your URLconf::
|
...and add the following line to the appropriate model in your URLconf::
|
||||||
|
|
||||||
(r'^post/$', SomeModelFormPreview(forms.models.form_for_model(SomeModel))),
|
|
||||||
|
|
||||||
Or, if you already have a Form class defined for the model::
|
|
||||||
|
|
||||||
(r'^post/$', SomeModelFormPreview(SomeModelForm)),
|
(r'^post/$', SomeModelFormPreview(SomeModelForm)),
|
||||||
|
|
||||||
|
where ``SomeModelForm`` is a Form or ModelForm class for the model.
|
||||||
|
|
||||||
4. Run the Django server and visit ``/post/`` in your browser.
|
4. Run the Django server and visit ``/post/`` in your browser.
|
||||||
|
|
||||||
.. _template loader docs: ../templates_python/#loader-types
|
.. _template loader docs: ../templates_python/#loader-types
|
||||||
|
|
Loading…
Reference in New Issue