Opened 4 years ago
Closed 3 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 )
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 , 4 years ago
Cc: | added |
---|---|
Has patch: | set |
Owner: | changed from | to
Status: | new → assigned |
Type: | Uncategorized → New feature |
comment:2 by , 4 years ago
Needs documentation: | set |
---|---|
Needs tests: | set |
Triage Stage: | Unreviewed → Accepted |
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 , 4 years ago
Summary: | Add model instance to app_list context → Added 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 , 4 years ago
Needs tests: | unset |
---|
comment:5 by , 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 , 4 years ago
Patch needs improvement: | set |
---|
comment:7 by , 3 years ago
Description: | modified (diff) |
---|---|
Summary: | Added model instance to app_list context → Added model class to app_list context |
comment:8 by , 3 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
PR -> https://github.com/django/django/pull/13447