Loading docs/ref/contrib/admin/_images/raw_id_fields.png 0 → 100644 +1.83 KiB Loading image diff... docs/ref/contrib/admin/index.txt +8 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
docs/ref/contrib/admin/index.txt +8 −0 Original line number Diff line number Diff line Loading @@ -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 Loading