Opened 4 years ago

Closed 4 years ago

#32031 closed New feature (fixed)

Added model class to app_list context

Reported by: Raffaele Salmaso Owned by: Raffaele Salmaso
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Raffaele Salmaso 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 (last modified by Raffaele Salmaso)

I need to manipulate the app_list in my custom admin view, and the easiest way to get the result is to have access to the model class (currently the dictionary is a serialized model).

In addition I would make the _build_app_dict method public, as it is used by the two views index and app_index.

Change History (9)

comment:1 by Raffaele Salmaso, 4 years ago

Cc: Raffaele Salmaso added
Has patch: set
Owner: changed from nobody to Raffaele Salmaso
Status: newassigned
Type: UncategorizedNew feature

comment:2 by Carlton Gibson, 4 years ago

Needs documentation: set
Needs tests: set
Triage Stage: UnreviewedAccepted

Seems reasonable. I guess we need at least a release note, and tests, but do you think we need additional docs here? (The related methods aren't themselves documented so not sure what we should say.) Thanks.

comment:3 by Raffaele Salmaso, 4 years ago

Summary: Add model instance to app_list contextAdded model instance to app_list context

Release note, docs, and tests added.

For additional docs: I don't know either. I just looked at the code and I didn't check for docs.

comment:4 by Carlton Gibson, 4 years ago

Needs tests: unset

comment:5 by Jacob Walls, 4 years ago

Needs documentation: unset

each_context() is the currently documented way to access this functionality, so it strikes me that making updates there should suffice, and further documentation improvements could be evaluated separately.

comment:6 by Mariusz Felisiak, 4 years ago

Patch needs improvement: set

comment:7 by Raffaele Salmaso, 4 years ago

Description: modified (diff)
Summary: Added model instance to app_list contextAdded model class to app_list context

comment:8 by Mariusz Felisiak, 4 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 3733ae8:

Fixed #32031 -- Added model class for each model to AdminSite.each_context().

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