summaryrefslogtreecommitdiff
path: root/docs/modelforms.txt
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2008-07-21 16:38:54 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2008-07-21 16:38:54 +0000
commit24aa08f486d7fa7fbfc91b35dd41aadeb0c900da (patch)
treefb9d58f309977467896b8dcf94f6fbb5e744786e /docs/modelforms.txt
parentf28474547be843055474f0ecd05850eaed3c6d3a (diff)
Refs #7864 -- Updates to documentation for the oldforms/newforms switch.
* Moved forms.txt to oldforms.txt * Moved newforms.txt to forms.txt * Updated links and most references to "newforms" (there are a few sections that need a more significant rewrite). git-svn-id: http://code.djangoproject.com/svn/django/trunk@8020 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/modelforms.txt')
-rw-r--r--docs/modelforms.txt20
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/modelforms.txt b/docs/modelforms.txt
index 9c06bc409d..91d3a9fac9 100644
--- a/docs/modelforms.txt
+++ b/docs/modelforms.txt
@@ -1,6 +1,6 @@
-==========================
-Using newforms with models
-==========================
+=======================
+Using forms with models
+=======================
``ModelForm``
=============
@@ -16,7 +16,7 @@ class from a Django model.
For example::
- >>> from django.newforms import ModelForm
+ >>> from django.forms import ModelForm
# Create the form class.
>>> class ArticleForm(ModelForm):
@@ -86,11 +86,11 @@ the full list of conversions:
As you might expect, the ``ForeignKey`` and ``ManyToManyField`` model field
types are special cases:
- * ``ForeignKey`` is represented by ``django.newforms.ModelChoiceField``,
+ * ``ForeignKey`` is represented by ``django.forms.ModelChoiceField``,
which is a ``ChoiceField`` whose choices are a model ``QuerySet``.
* ``ManyToManyField`` is represented by
- ``django.newforms.ModelMultipleChoiceField``, which is a
+ ``django.forms.ModelMultipleChoiceField``, which is a
``MultipleChoiceField`` whose choices are a model ``QuerySet``.
In addition, each generated form field has attributes set as follows:
@@ -121,7 +121,7 @@ A full example
Consider this set of models::
from django.db import models
- from django.newforms import ModelForm
+ from django.forms import ModelForm
TITLE_CHOICES = (
('MR', 'Mr.'),
@@ -240,14 +240,14 @@ For example::
>>> new_author = f.save()
Other than the ``save()`` and ``save_m2m()`` methods, a ``ModelForm``
-works exactly the same way as any other ``newforms`` form. For
+works exactly the same way as any other ``forms`` form. For
example, the ``is_valid()`` method is used to check for validity, the
``is_multipart()`` method is used to determine whether a form requires
multipart file upload (and hence whether ``request.FILES`` must be
-passed to the form), etc. See `the standard newforms documentation`_
+passed to the form), etc. See `the standard forms documentation`_
for more information.
-.. _the standard newforms documentation: ../newforms/
+.. _the standard forms documentation: ../forms/
Using a subset of fields on the form
------------------------------------