Skip to content

Commit

Permalink
[1.4.X] Fixed #9471 - Expanded ModelAdmin.raw_id_fields docs; thanks …
Browse files Browse the repository at this point in the history
…adroffne for the suggestion.

Backport of da958eb from master
  • Loading branch information
timgraham committed Oct 24, 2012
1 parent ce168bb commit baf1f1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Binary file added docs/ref/contrib/admin/_images/raw_id_fields.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/ref/contrib/admin/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit baf1f1d

Please sign in to comment.