On Sun, Jan 11, 2015 at 11:33 AM, Collin Anderson <[email protected]>
wrote:

> Hi All,
>
> Based on the early feedback, here's a scaled back proposal:
>
> 1. In the project_template settings.py for new projects:
> - Enable the request context processor
> - Keep the auth context processor
> - Remove the rest (you can always install them by hand).
>

TEMPLATE_CONTEXT_PROCESSORS isn't in the project template at present; it is
a default value inherited from global settings, whose initial value is:

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.contrib.auth.context_processors.auth',
    'django.template.context_processors.debug',
    'django.template.context_processors.i18n',
    'django.template.context_processors.media',
    'django.template.context_processors.static',
    'django.template.context_processors.tz',
    # 'django.template.context_processors.request',
    'django.contrib.messages.context_processors.messages',
)

ISTM that we can't pare that down with just auth and request without having
some pretty profound consequences on existing sites.

It also points out a second use case: the messages context processor
shouldn't need to be manually installed; it should be automatically added
as part of app configuration, if and only if messages is in INSTALLED_APPS.
AppConfigs should make that sort of thing possible. If we're tinkering with
context_processors, we might as well fix *all* the problems (although this
is starting to looks like a 1.9-timeline project...)

2. Make the admin work without needing specific context_processors enabled.
>

This second point I definitely agree with. If anything, I think it's an
argument for the "hierarchical URL config" thing; there isn't an inherent
problem with context processors, it's that you need to have specific
context processors in place in order for admin to work, and you shouldn't
need to have 2+ pieces of configuration to get an app to work.

Russ %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAJxq84--0azC5TmYWsudODfCRUZACoO8_o2H8uFjw%3D-djsgyxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to