Opened 6 months ago

Closed 12 days ago

Last modified 12 days ago

#36925 closed Cleanup/optimization (fixed)

InlineModelAdmin docs do not mention view_on_site as a shared feature with ModelAdmin

Reported by: James Aylett Owned by: James Aylett
Component: Documentation Version: 6.0
Severity: Normal Keywords:
Cc: VIZZARD-X, Ahmed Asar Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The capability was added to resolve #8261, but while it was documented for ModelAdmin it wasn't added to the list of shared features for InlineModelAdmin.

(This should be easy enough to resolve, although I haven't checked whether there are other shared features that aren't currently listed, which would be ideal to do when resolving. I'll try to find time to check and get a PR together.)

Change History (13)

comment:1 by James Aylett, 6 months ago

There are also:

  • empty_value_display, autocomplete_fields, sortable_by all of which are documented in ModelAdmin (the first I've used today so it's definitely worth noting)
  • show_full_result_count is listed in BaseModelAdmin, but I'm unconvinced it's used for inlines
  • various get_* methods (which are also documented but effectively duplicate attributes and so are probably best left off)

And the sort order for the shared features doesn't make sense; it's neither consistent with that in the ModelAdmin docs above, nor alphabetical.

I have a draft patch, but would appreciate thoughts on what the sort order for that list (around docs/contrib/admin/index.rst:2278) should be.

Last edited 6 months ago by James Aylett (previous) (diff)

comment:2 by VIZZARD-X, 6 months ago

Cc: VIZZARD-X added

comment:3 by Ahmed Asar, 6 months ago

Cc: Ahmed Asar added
Owner: set to Ahmed Asar
Status: newassigned

comment:4 by Ahmed Asar, 6 months ago

Thank you for the great effort on this.
If the ticket gets accepted, I’ll start working on it right away.

comment:5 by Jacob Walls, 5 months ago

Owner: changed from Ahmed Asar to James Aylett
Triage Stage: UnreviewedAccepted

Thanks for offering to contribute a fix, James. I think the ordering is fine as is: it seems to be in rough order of importance and clustered by similar features.

comment:6 by Shubh Rai, 5 months ago

hello I want to help with this documentation update if it’s still open for contribution. Please let me know if you're already working on a patch, otherwise I can take a look.

comment:7 by James Aylett, 5 months ago

Has patch: set

Apologies for the delay, got distracted by something. Patch as https://github.com/django/django/pull/20810

comment:8 by blighj, 2 weeks ago

Triage Stage: AcceptedReady for checkin

comment:9 by Jacob Walls, 2 weeks ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

I'm not certain all of these were checked for inlines, e.g. from a manual test I don't see a way to use sortable_by to do anything with inlines, as there is no changelist for them.

comment:10 by Jacob Walls, 12 days ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:11 by Jacob Walls <jacobtylerwalls@…>, 12 days ago

Resolution: fixed
Status: assignedclosed

In 21b3a4c:

Fixed #36925 -- Listed further shared features for InlineModelAdmin.

comment:12 by Jacob Walls <jacobtylerwalls@…>, 12 days ago

In 7a6c096:

[6.1.x] Fixed #36925 -- Listed further shared features for InlineModelAdmin.

Backport of 21b3a4c4c528ca827adda14b6c4cf045afba6d4f from main.

comment:13 by Jacob Walls <jacobtylerwalls@…>, 12 days ago

In ead820e8:

[6.0.x] Fixed #36925 -- Listed further shared features for InlineModelAdmin.

Backport of 21b3a4c4c528ca827adda14b6c4cf045afba6d4f from main.

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