[Django] #24117: make admin not require context_processors

5 views
Skip to first unread message

Django

unread,
Jan 10, 2015, 4:27:11 PM1/10/15
to django-...@googlegroups.com
#24117: make admin not require context_processors
--------------------------------------+--------------------
Reporter: collinanderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------


--
Ticket URL: <https://code.djangoproject.com/ticket/24117>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 10, 2015, 4:29:34 PM1/10/15
to django-...@googlegroups.com
#24117: make admin not require context_processors
-------------------------------------+-------------------------------------
Reporter: collinanderson | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by collinanderson):

* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24117#comment:1>

Django

unread,
Jan 10, 2015, 4:39:19 PM1/10/15
to django-...@googlegroups.com
#24117: make admin not require context_processors
--------------------------------------+------------------------------------

Reporter: collinanderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* needs_docs: 0 => 1
* stage: Unreviewed => Accepted


Comment:

`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.

--
Ticket URL: <https://code.djangoproject.com/ticket/24117#comment:2>

Django

unread,
Jan 10, 2015, 5:40:56 PM1/10/15
to django-...@googlegroups.com
#24117: make admin not require context_processors
--------------------------------------+------------------------------------

Reporter: collinanderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by collinanderson):

Ok. I tried to summarize the IRC discussion here:
https://groups.google.com/d/topic/django-developers/WlK_7OoThaQ/discussion

--
Ticket URL: <https://code.djangoproject.com/ticket/24117#comment:3>

Django

unread,
Jan 10, 2015, 5:53:41 PM1/10/15
to django-...@googlegroups.com
#24117: make admin not require context_processors
--------------------------------------+------------------------------------

Reporter: collinanderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by collinanderson):

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?

--
Ticket URL: <https://code.djangoproject.com/ticket/24117#comment:4>

Django

unread,
Jan 10, 2015, 6:04:49 PM1/10/15
to django-...@googlegroups.com
#24117: make admin not require context_processors
--------------------------------------+------------------------------------

Reporter: collinanderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by timgraham):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/24117#comment:5>

Django

unread,
Jan 12, 2015, 8:31:15 AM1/12/15
to django-...@googlegroups.com
#24117: make admin not require context_processors
--------------------------------------+------------------------------------

Reporter: collinanderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by collinanderson):

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

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24117#comment:6>

Django

unread,
Jan 12, 2015, 10:56:41 AM1/12/15
to django-...@googlegroups.com
#24117: make admin not require context_processors
--------------------------------------+------------------------------------

Reporter: collinanderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"58833f519797e15ae3cb39b1613e5f7e09c96952"]:
{{{
#!CommitTicketReference repository=""
revision="58833f519797e15ae3cb39b1613e5f7e09c96952"
Made Django's templates get their own LANGUAGE_* variables.

Refs #24117
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24117#comment:7>

Django

unread,
Jan 12, 2015, 1:24:14 PM1/12/15
to django-...@googlegroups.com
#24117: make admin not require context_processors
--------------------------------------+------------------------------------

Reporter: collinanderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by collinanderson):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/24117#comment:8>

Django

unread,
Jan 12, 2015, 1:30:46 PM1/12/15
to django-...@googlegroups.com
#24117: make admin not require context_processors
--------------------------------------+------------------------------------

Reporter: collinanderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by collinanderson):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24117#comment:9>

Reply all
Reply to author
Forward
0 new messages