Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#7905 closed (fixed)

document raw_id_fields option in InlineModelAdmin

Reported by: Matthew Flanagan <mattimustang@…> Owned by:
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

A quick patch to document this option.

Index: docs/admin.txt
===================================================================
--- docs/admin.txt      (revision 8051)
+++ docs/admin.txt      (working copy)
@@ -569,6 +569,17 @@

 .. _max_num in formsets: ../modelforms/#limiting-the-number-of-objects-editable

+``raw_id_fields``
+~~~~~~~~~~~~~~~~~
+
+By default, Django's admin uses a select-box interface (<select>) for
+fields that are ``ForeignKey``. Sometimes you don't want to incur the
+overhead of having to select all the related instances to display in the
+drop-down.
+
+``raw_id_fields`` is a list of fields you would like to change
+into a ``Input`` widget for the primary key.
+
 ``template``
 ~~~~~~~~~~~~

Attachments (0)

Change History (5)

comment:1 Changed 6 years ago by shawnr

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to shawnr
  • Patch needs improvement unset

comment:2 Changed 6 years ago by shawnr

  • Triage Stage changed from Unreviewed to Ready for checkin

Doublechecked this is accurate, and it is. Malcolm approved at DC Sprint.

comment:3 Changed 6 years ago by shawnr

  • Owner shawnr deleted

comment:4 Changed 6 years ago by brosner

  • Resolution set to fixed
  • Status changed from new to closed

(In [8176]) Clarified the raw_id_fields documentation and added it to InlineModelAdmin? options section. Added examples as well. Fixes #7905. Thanks Matthew Flanagan for the report.

comment:5 Changed 3 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.