Opened 9 years ago

Last modified 9 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:2 by Tim Graham, 9 years ago

Needs documentation: set
Triage Stage: UnreviewedAccepted

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 Collin Anderson, 9 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 Collin Anderson, 9 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 Tim Graham, 9 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 Collin Anderson, 9 years ago

This is the minimum change needed for the current context_processors proposal.

https://github.com/django/django/pull/3896

comment:7 by Tim Graham <timograham@…>, 9 years ago

In 58833f519797e15ae3cb39b1613e5f7e09c96952:

Made Django's templates get their own LANGUAGE_* variables.

Refs #24117

comment:8 by Collin Anderson, 9 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.

comment:9 by Collin Anderson, 9 years ago

But I was thinking it might be better to defer until 1.9 for that.

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