Fixed #10510 -- Added missing versionadded marker for formfield_for_foreignkey docs. Thanks to onno.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2009-03-24 11:41:37 +00:00
parent 01757192e6
commit c4eb2883bc
1 changed files with 9 additions and 7 deletions

View File

@ -38,13 +38,13 @@ There are five steps in activating the Django admin site:
``ModelAdmin`` classes. ``ModelAdmin`` classes.
5. Hook the ``AdminSite`` instance into your URLconf. 5. Hook the ``AdminSite`` instance into your URLconf.
Other topics Other topics
------------ ------------
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
actions actions
``ModelAdmin`` objects ``ModelAdmin`` objects
@ -427,16 +427,16 @@ edit and save multiple rows at once.
``list_editable`` interacts with a couple of other options in particular ``list_editable`` interacts with a couple of other options in particular
ways; you should note the following rules: ways; you should note the following rules:
* To use ``list_editable`` you must have defined ``ordering`` defined on * To use ``list_editable`` you must have defined ``ordering`` defined on
either your model or your ``ModelAdmin``. either your model or your ``ModelAdmin``.
* Any field in ``list_editable`` must also be in ``list_display``. You * Any field in ``list_editable`` must also be in ``list_display``. You
can't edit a field that's not displayed! can't edit a field that's not displayed!
* The same field can't be listed in both ``list_editable`` and * The same field can't be listed in both ``list_editable`` and
``list_display_links`` -- a field can't be both a form and a link. ``list_display_links`` -- a field can't be both a form and a link.
You'll get a validation error if any of these rules are broken. You'll get a validation error if any of these rules are broken.
``list_filter`` ``list_filter``
@ -770,6 +770,8 @@ This wrapping will protect ``self.my_view`` from unauthorized access.
``formfield_for_foreignkey(self, db_field, request, **kwargs)`` ``formfield_for_foreignkey(self, db_field, request, **kwargs)``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 1.1
The ``formfield_for_foreignkey`` method on a ``ModelAdmin`` allows you to The ``formfield_for_foreignkey`` method on a ``ModelAdmin`` allows you to
override the default formfield for a foreign key field. For example, to override the default formfield for a foreign key field. For example, to
return a subset of objects for this foreign key field based on the user:: return a subset of objects for this foreign key field based on the user::
@ -1207,7 +1209,7 @@ Django-powered Web site. Just create multiple instances of ``AdminSite`` and
root each one at a different URL. root each one at a different URL.
.. versionchanged:: 1.1 .. versionchanged:: 1.1
The method for hooking ``AdminSite`` instances into urls has changed in The method for hooking ``AdminSite`` instances into urls has changed in
Django 1.1. Django 1.1.
In this example, the URLs ``/basic-admin/`` and ``/advanced-admin/`` feature In this example, the URLs ``/basic-admin/`` and ``/advanced-admin/`` feature