Refs #7864 -- Corrected more instances of "newforms" in the docs.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Gary Wilson Jr 2008-07-21 16:56:52 +00:00
parent 4dd242bdeb
commit ce3bdc86d4
5 changed files with 20 additions and 20 deletions

View File

@ -494,7 +494,7 @@ on your ``ModelAdmin``::
Keep in mind that this will be prepended with ``MEDIA_URL``. The same rules Keep in mind that this will be prepended with ``MEDIA_URL``. The same rules
apply as `regular media definitions on forms`_. apply as `regular media definitions on forms`_.
.. _regular media definitions on forms: ../newforms/#media .. _regular media definitions on forms: ../forms/#media
``InlineModelAdmin`` objects ``InlineModelAdmin`` objects
============================ ============================
@ -558,7 +558,7 @@ inline.
This controls the number of extra forms the formset will display in addition This controls the number of extra forms the formset will display in addition
to the initial forms. See the `formsets documentation`_ for more information. to the initial forms. See the `formsets documentation`_ for more information.
.. _formsets documentation: ../newforms/#formsets .. _formsets documentation: ../forms/#formsets
``max_num`` ``max_num``
~~~~~~~~~~~ ~~~~~~~~~~~

View File

@ -2191,7 +2191,7 @@ A formset is a layer of abstraction to working with multiple forms on the same
page. It can be best compared to a data grid. Let's say you have the following page. It can be best compared to a data grid. Let's say you have the following
form:: form::
>>> from django import newforms as forms >>> from django import forms
>>> class ArticleForm(forms.Form): >>> class ArticleForm(forms.Form):
... title = forms.CharField() ... title = forms.CharField()
... pub_date = forms.DateField() ... pub_date = forms.DateField()
@ -2199,7 +2199,7 @@ form::
You might want to allow the user to create several articles at once. To create You might want to allow the user to create several articles at once. To create
a formset of out of an ``ArticleForm`` you would do:: a formset of out of an ``ArticleForm`` you would do::
>>> from django.newforms.formsets import formset_factory >>> from django.forms.formsets import formset_factory
>>> ArticleFormSet = formset_factory(ArticleForm) >>> ArticleFormSet = formset_factory(ArticleForm)
You now have created a formset named ``ArticleFormSet``. The formset gives you You now have created a formset named ``ArticleFormSet``. The formset gives you
@ -2308,7 +2308,7 @@ an exception::
>>> formset = ArticleFormSet(data) >>> formset = ArticleFormSet(data)
Traceback (most recent call last): Traceback (most recent call last):
... ...
django.newforms.util.ValidationError: [u'ManagementForm data is missing or has been tampered with'] django.forms.util.ValidationError: [u'ManagementForm data is missing or has been tampered with']
It is used to keep track of how many form instances are being displayed. If It is used to keep track of how many form instances are being displayed. If
you are adding new forms via javascript, you should increment the count fields you are adding new forms via javascript, you should increment the count fields
@ -2320,7 +2320,7 @@ Custom formset validation
A formset has a ``clean`` method similar to the one on a ``Form`` class. This A formset has a ``clean`` method similar to the one on a ``Form`` class. This
is where you define your own validation that deals at the formset level:: is where you define your own validation that deals at the formset level::
>>> from django.newforms.formsets import BaseFormSet >>> from django.forms.formsets import BaseFormSet
>>> class BaseArticleFormSet(BaseFormSet): >>> class BaseArticleFormSet(BaseFormSet):
... def clean(self): ... def clean(self):

View File

@ -817,7 +817,7 @@ These values and lists are 1-based, not 0-based, so the first page would be
represented as page ``1``. represented as page ``1``.
For more on pagination, read the `pagination documentation`_. For more on pagination, read the `pagination documentation`_.
.. _`pagination documentation`: ../pagination/ .. _`pagination documentation`: ../pagination/
**New in Django development version:** **New in Django development version:**
@ -909,10 +909,10 @@ for creating, editing and deleting objects.
**Changed in Django development version:** **Changed in Django development version:**
``django.views.generic.create_update.create_object`` and ``django.views.generic.create_update.create_object`` and
``django.views.generic.create_update.update_object`` now use `newforms`_ to ``django.views.generic.create_update.update_object`` now use the new `forms
build and display the form. library`_ to build and display the form.
.. _newforms: ../newforms/ .. _forms library: ../forms/
``django.views.generic.create_update.create_object`` ``django.views.generic.create_update.create_object``
---------------------------------------------------- ----------------------------------------------------
@ -927,7 +927,7 @@ validation errors (if there are any) and saving the object.
* Either ``form_class`` or ``model`` is required. * Either ``form_class`` or ``model`` is required.
If you provide ``form_class``, it should be a If you provide ``form_class``, it should be a
``django.newforms.ModelForm`` subclass. Use this argument when you need ``django.forms.ModelForm`` subclass. Use this argument when you need
to customize the model's form. See the `ModelForm docs`_ for more to customize the model's form. See the `ModelForm docs`_ for more
information. information.
@ -973,7 +973,7 @@ If ``template_name`` isn't specified, this view will use the template
In addition to ``extra_context``, the template's context will be: In addition to ``extra_context``, the template's context will be:
* ``form``: A ``django.newforms.ModelForm`` instance representing the form * ``form``: A ``django.forms.ModelForm`` instance representing the form
for creating the object. This lets you refer to form fields easily in the for creating the object. This lets you refer to form fields easily in the
template system. template system.
@ -988,7 +988,7 @@ In addition to ``extra_context``, the template's context will be:
``Form`` objects in templates. ``Form`` objects in templates.
.. _authentication system: ../authentication/ .. _authentication system: ../authentication/
.. _ModelForm docs: ../newforms/modelforms .. _ModelForm docs: ../forms/modelforms
.. _forms documentation: ../forms/ .. _forms documentation: ../forms/
``django.views.generic.create_update.update_object`` ``django.views.generic.create_update.update_object``
@ -1005,7 +1005,7 @@ object. This uses the automatic manipulators that come with Django models.
* Either ``form_class`` or ``model`` is required. * Either ``form_class`` or ``model`` is required.
If you provide ``form_class``, it should be a If you provide ``form_class``, it should be a
``django.newforms.ModelForm`` subclass. Use this argument when you need ``django.forms.ModelForm`` subclass. Use this argument when you need
to customize the model's form. See the `ModelForm docs`_ for more to customize the model's form. See the `ModelForm docs`_ for more
information. information.
@ -1063,7 +1063,7 @@ If ``template_name`` isn't specified, this view will use the template
In addition to ``extra_context``, the template's context will be: In addition to ``extra_context``, the template's context will be:
* ``form``: A ``django.newforms.ModelForm`` instance representing the form * ``form``: A ``django.forms.ModelForm`` instance representing the form
for editing the object. This lets you refer to form fields easily in the for editing the object. This lets you refer to form fields easily in the
template system. template system.
@ -1074,7 +1074,7 @@ In addition to ``extra_context``, the template's context will be:
<p>{{ form.address.label_tag }} {{ form.address }}</p> <p>{{ form.address.label_tag }} {{ form.address }}</p>
</form> </form>
See the `newforms documentation`_ for more information about using See the `forms documentation`_ for more information about using
``Form`` objects in templates. ``Form`` objects in templates.
* ``object``: The original object being edited. This variable's name * ``object``: The original object being edited. This variable's name

View File

@ -384,7 +384,7 @@ Similar to regular formsets there are a couple enhanced formset classes that
provide all the right things to work with your models. Lets reuse the provide all the right things to work with your models. Lets reuse the
``Author`` model from above:: ``Author`` model from above::
>>> from django.newforms.models import modelformset_factory >>> from django.forms.models import modelformset_factory
>>> AuthorFormSet = modelformset_factory(Author) >>> AuthorFormSet = modelformset_factory(Author)
This will create a formset that is capable of working with the data associated This will create a formset that is capable of working with the data associated
@ -417,7 +417,7 @@ configurable::
Alternatively, you can use a subclassing based approach:: Alternatively, you can use a subclassing based approach::
from django.newforms.models import BaseModelFormSet from django.forms.models import BaseModelFormSet
class BaseAuthorFormSet(BaseModelFormSet): class BaseAuthorFormSet(BaseModelFormSet):
def get_queryset(self): def get_queryset(self):
@ -494,7 +494,7 @@ with related objects through a foreign key. Suppose you have two models
``Author`` and ``Book``. You want to create a formset that works with the ``Author`` and ``Book``. You want to create a formset that works with the
books of a specific author. Here is how you could accomplish this:: books of a specific author. Here is how you could accomplish this::
>>> from django.newforms.models import inlineformset_factory >>> from django.forms.models import inlineformset_factory
>>> BookFormSet = inlineformset_factory(Author, Book) >>> BookFormSet = inlineformset_factory(Author, Book)
>>> author = Author.objects.get(name=u'Orson Scott Card') >>> author = Author.objects.get(name=u'Orson Scott Card')
>>> formset = BookFormSet(instance=author) >>> formset = BookFormSet(instance=author)

View File

@ -864,7 +864,7 @@ useful for testing Web applications:
rendered on the form. rendered on the form.
``form`` is the name the ``Form`` instance was given in the template ``form`` is the name the ``Form`` instance was given in the template
context. Note that this works only for ``newforms.Form`` instances, not context. Note that this works only for ``forms.Form`` instances, not
``oldforms.Form`` instances. ``oldforms.Form`` instances.
``field`` is the name of the field on the form to check. If ``field`` ``field`` is the name of the field on the form to check. If ``field``