Opened 10 years ago
Last modified 10 years ago
#24117 new Cleanup/optimization
make admin not require context_processors
Reported by: | Collin Anderson | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Change History (9)
comment:1 by , 10 years ago
Has patch: | set |
---|
comment:2 by , 10 years ago
Needs documentation: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
AdminSite.each_context()
documentation needs to be updated. The release notes should encourage its use in light of this change. It would be helpful to add a summary of the IRC discussion that led to this ticket in the ticket description for posterity.
comment:3 by , 10 years ago
Ok. I tried to summarize the IRC discussion here: https://groups.google.com/d/topic/django-developers/WlK_7OoThaQ/discussion
comment:4 by , 10 years ago
Ok, I updated the each_context()
docs.
The new variables should work just fine without each_context()
as long as you had the context_processors installed previously, so it seems to me it's a little different case than has_permission
. Right?
comment:5 by , 10 years ago
Right, the case I am thinking of is someone adding custom admin views as third-party app or something. They should no longer assume their users have all the context processors enabled and so should be sure to add each_context()
to their views.
comment:6 by , 10 years ago
This is the minimum change needed for the current context_processors proposal.
comment:8 by , 10 years ago
For "messages" and "user", I'd be interested in looking into the possibility of passing "request" to the template and using "request.messages" (a new "feature" I have half implemented in my stash) and "request.user" in the templates.
https://github.com/django/django/pull/3882