summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2012-10-24 16:30:23 -0400
committerTim Graham <timograham@gmail.com>2012-10-24 17:50:37 -0400
commitbaf1f1dcde1f318fdb6514eaa8497fc958aa69d3 (patch)
treefb754076877137b750cbd57e7285378c1635c52e
parentce168bb8994b0a7e032166e63a8b1cec034694d6 (diff)
[1.4.X] Fixed #9471 - Expanded ModelAdmin.raw_id_fields docs; thanks adroffne for the suggestion.
Backport of da958eb209 from master
-rw-r--r--docs/ref/contrib/admin/_images/raw_id_fields.pngbin0 -> 1871 bytes
-rw-r--r--docs/ref/contrib/admin/index.txt8
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/_images/raw_id_fields.png b/docs/ref/contrib/admin/_images/raw_id_fields.png
new file mode 100644
index 0000000000..0774c40469
--- /dev/null
+++ b/docs/ref/contrib/admin/_images/raw_id_fields.png
Binary files differ
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 6fc88cc135..c403541129 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -814,6 +814,14 @@ subclass::
class ArticleAdmin(admin.ModelAdmin):
raw_id_fields = ("newspaper",)
+ The ``raw_id_fields`` ``Input`` widget should contain a primary key if the
+ field is a ``ForeignKey`` or a comma separated list of values if the field
+ is a ``ManyToManyField``. The ``raw_id_fields`` widget shows a magnifying
+ glass button next to the field which allows users to search for and select
+ a value:
+
+ .. image:: _images/raw_id_fields.png
+
.. attribute:: ModelAdmin.readonly_fields
.. versionadded:: 1.2