diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-03-17 20:51:47 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-03-17 20:51:47 +0000 |
| commit | 7bc0878922d9d93ab8f4ef8a5c5ba7a1c671279f (patch) | |
| tree | b7fe40fd4a316fea577f140bb3357a9b4f5274a1 /docs/ref/contrib | |
| parent | a7d1c73ad9eca3010768153e3e71453dbe32267a (diff) | |
Fixed #8939: added a `list_editable` option to `ModelAdmin`; fields declared `list_editable` may be edited, in bulk, on the changelist page. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/contrib')
| -rw-r--r-- | docs/ref/contrib/admin.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin.txt b/docs/ref/contrib/admin.txt index 35bfde217c..1813a191f6 100644 --- a/docs/ref/contrib/admin.txt +++ b/docs/ref/contrib/admin.txt @@ -403,6 +403,32 @@ the change list page:: Finally, note that in order to use ``list_display_links``, you must define ``list_display``, too. +``list_editable`` +~~~~~~~~~~~~~~~~~ + +.. versionadded:: 1.1 + +Set ``list_editable`` to a list of field names on the model which will allow +editing on the change list page. That is, fields listed in ``list_editable`` +will be displayed as form widgets on the change list page, allowing users to +edit and save multiple rows at once. + +.. note:: + + ``list_editable`` interacts with a couple of other options in particular + ways; you should note the following rules: + + * To use ``list_editable`` you must have defined ``ordering`` defined on + either your model or your ``ModelAdmin``. + + * Any field in ``list_editable`` must also be in ``list_display``. You + can't edit a field that's not displayed! + + * 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. + + You'll get a validation error if any of these rules are broken. + ``list_filter`` ~~~~~~~~~~~~~~~ |
