summaryrefslogtreecommitdiff
path: root/docs/admin.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/admin.txt')
-rw-r--r--docs/admin.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/admin.txt b/docs/admin.txt
index e63131c7b9..996930fc2b 100644
--- a/docs/admin.txt
+++ b/docs/admin.txt
@@ -146,6 +146,20 @@ The ``field_options`` dictionary can have the following keys:
under the heading of the fieldset. It's used verbatim, so you can use any HTML
and you must escape any special HTML characters (such as ampersands) yourself.
+``filter_horizontal``
+~~~~~~~~~~~~~~~~~~~~~
+
+Use a nifty unobtrusive Javascript "filter" interface instead of the
+usability-challenged ``<select multiple>`` in the admin form. The value is a
+list of fields that should be displayed as a horizontal filter interface. See
+``filter_vertical`` to use a vertical interface.
+
+``filter_vertical``
+~~~~~~~~~~~~~~~~~~~
+
+Same as ``filter_horizontal``, but is a vertical display of the filter
+interface.
+
``list_display``
~~~~~~~~~~~~~~~~
@@ -341,6 +355,21 @@ ordered. This should be a list or tuple in the same format as a model's
If this isn't provided, the Django admin will use the model's default ordering.
+``prepopulated_fields``
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Set ``prepopulated_fields`` to a dictionary mapping field names to the fields
+it should prepopulate from::
+
+ class ArticleAdmin(admin.ModelAdmin):
+ prepopulated_fields = {"slug": ("title",)}
+
+When set the given fields will use a bit of Javascript to populate from the
+fields assigned.
+
+``prepopulated_fields`` doesn't accept DateTimeFields, ForeignKeys nor
+ManyToManyFields.
+
``radio_fields``
~~~~~~~~~~~~~~~~
@@ -358,6 +387,17 @@ You have the choice of using ``HORIZONTAL`` or ``VERTICAL`` from the
Don't include a field in ``radio_fields`` unless it's a ``ForeignKey`` or has
``choices`` set.
+``raw_id_fields``
+~~~~~~~~~~~~~~~~~
+
+By default, Django's admin uses a select-box interface (<select>) for
+fields that are ``ForeignKey``. Sometimes you don't want to incur the
+overhead of having to select all the related instances to display in the
+drop-down.
+
+``raw_id_fields`` is a list of fields you would like to change
+into a ``Input`` widget for the primary key.
+
``save_as``
~~~~~~~~~~~