summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBrian Rosner <brosner@gmail.com>2008-06-12 20:13:27 +0000
committerBrian Rosner <brosner@gmail.com>2008-06-12 20:13:27 +0000
commitf914b0a71b8059166208175f994f61e4984eab1d (patch)
tree35b98683199273e79824e378c8803a844dd4080c /docs
parent4a6965b3087901b88df813d5696962155311f4dd (diff)
newforms-admin: Fixed #5731 -- Implemented ModelAdmin.radio_fields to match trunk's radio_admin. Removed legacy code and added tests. Thanks Karen Tracey for the initial work.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/admin.txt17
-rw-r--r--docs/custom_model_fields.txt1
-rw-r--r--docs/model-api.txt10
3 files changed, 17 insertions, 11 deletions
diff --git a/docs/admin.txt b/docs/admin.txt
index 7466d41ee3..0d3cb811ee 100644
--- a/docs/admin.txt
+++ b/docs/admin.txt
@@ -344,6 +344,23 @@ 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.
+``radio_fields``
+----------------
+
+By default, Django's admin uses a select-box interface (<select>) for
+fields that are ``ForeignKey`` or have ``choices`` set. If a field is present
+in ``radio_fields``, Django will use a radio-button interface instead.
+Assuming ``group`` is a ``ForeignKey`` on the ``Person`` model::
+
+ class PersonAdmin(admin.ModelAdmin):
+ radio_fields = {"group": admin.VERTICAL}
+
+You have the choice of using ``HORIZONTAL`` or ``VERTICAL`` from the
+``django.contrib.admin`` module.
+
+Don't include a field in ``radio_fields`` unless it's a ``ForeignKey`` or has
+``choices`` set.
+
``save_as``
-----------
diff --git a/docs/custom_model_fields.txt b/docs/custom_model_fields.txt
index 2b344921ef..cbaac873e3 100644
--- a/docs/custom_model_fields.txt
+++ b/docs/custom_model_fields.txt
@@ -204,7 +204,6 @@ order:
* ``unique_for_year``
* ``validator_list``
* ``choices``
- * ``radio_admin``
* ``help_text``
* ``db_column``
* ``db_tablespace``: Currently only used with the Oracle backend and only
diff --git a/docs/model-api.txt b/docs/model-api.txt
index 5e8d177f97..57e366f959 100644
--- a/docs/model-api.txt
+++ b/docs/model-api.txt
@@ -663,16 +663,6 @@ unless you want to override the default primary-key behavior.
``primary_key=True`` implies ``blank=False``, ``null=False`` and
``unique=True``. Only one primary key is allowed on an object.
-``radio_admin``
-~~~~~~~~~~~~~~~
-
-By default, Django's admin uses a select-box interface (<select>) for
-fields that are ``ForeignKey`` or have ``choices`` set. If ``radio_admin``
-is set to ``True``, Django will use a radio-button interface instead.
-
-Don't use this for a field unless it's a ``ForeignKey`` or has ``choices``
-set.
-
``unique``
~~~~~~~~~~