Opened 7 years ago

Closed 3 years ago

Last modified 3 years ago

#9471 closed New feature (fixed)

Documentation Admin classes with raw_id_fields

Reported by: adroffne@… Owned by: nobody
Component: Documentation Version: 1.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The Django documentation is very unclear on the raw_id_fields feature. Please, describe the feature better, and add a screenshot showing a sample table of raw_id_fields. Also, explain the magnifying glass chooser aspect.

Most importantly, the documentation seems to treat raw_id_fields like comma-separated lists of IDs; like 1,2,3; rather than one ID per field. Also, note that the user must input the primary key, and the admin coder has to show the user that key somehow.

There should be more about Inline admin classes as compared to model Admin classes and raw_id_fields. Also, describe more on ForeignKey, ManyToMany, and ManyToMany with through.

I have used raw_id_fields in an Inline admin class to add several ManyToMany items for the first time. My understanding of raw_id_fields is limited, and my suggestions above may be plain wrong.

Change History (7)

comment:1 Changed 7 years ago by peter@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

There is no documentation of this feature. Better to write 'XXX TO DO'!

comment:2 Changed 7 years ago by jacob

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 4 years ago by lukeplant

  • Severity set to Normal
  • Type set to New feature

comment:4 Changed 4 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 4 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:6 Changed 3 years ago by Tim Graham <timograham@…>

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

In da958eb2098372c20cc3aaf905777b1a8d3144eb:

Fixed #9471 - Expanded ModelAdmin.raw_id_fields docs; thanks adroffne for the suggestion.

comment:7 Changed 3 years ago by Tim Graham <timograham@…>

In baf1f1dcde1f318fdb6514eaa8497fc958aa69d3:

[1.4.X] Fixed #9471 - Expanded ModelAdmin.raw_id_fields docs; thanks adroffne for the suggestion.

Backport of da958eb209 from master

Note: See TracTickets for help on using tickets.
Back to Top