diff options
| author | Tim Graham <timograham@gmail.com> | 2012-10-24 16:30:23 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2012-10-24 17:43:24 -0400 |
| commit | da958eb2098372c20cc3aaf905777b1a8d3144eb (patch) | |
| tree | ce5829d3ab6098653167041d0a52ea9a7b9a7b69 /docs | |
| parent | 1b096ad77362441d22c3eb7bfa03e9e221af2236 (diff) | |
Fixed #9471 - Expanded ModelAdmin.raw_id_fields docs; thanks adroffne for the suggestion.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/admin/_images/raw_id_fields.png | bin | 0 -> 1871 bytes | |||
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 8 |
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 Binary files differnew file mode 100644 index 0000000000..0774c40469 --- /dev/null +++ b/docs/ref/contrib/admin/_images/raw_id_fields.png diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index e9b573e3a0..6ed929cb7d 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -803,6 +803,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 By default the admin shows all fields as editable. Any fields in this |
