On Sun, Jan 11, 2015 at 5:58 PM, Aymeric Augustin <
[email protected]> wrote:

> On 11 janv. 2015, at 09:43, Russell Keith-Magee <[email protected]>
> wrote:
>
> > However, I'd still have some concerns about a project template that took
> out all the "useful" utilities, and required users to remember the exact
> spelling of half a dozen builtins to have functionality that would have
> historically been automatic.
>
> I would argue that many of them are only useful in a very loose sense :-)
> and the most obviously useful one, request, is omitted.
>
> I added the tz processor for consistency with the i18n processor but I
> never used it and I don’t think it’s needed.
>
> I don’t remember using on the i18n processor either. Perhaps some i18n
> features implicitly depend on it. I would have to check.
>

It doesn't look like it to me - I was under the impression that they did a
bit more than just put TIME_ZONE, LANGUAGES, LANGUAGE_CODE and
LANGUAGE_BIDI into context.


> The media and static processor enable obsolete template coding style. We
> shouldn’t encourage their use.
>
> Without having spent much time to research the consequences — it's on my
> TODO list but Collin brought it up before I investigated — my straw man
> proposal is:
>
> TEMPLATES = [
>     {
>         'BACKEND': 'django.template.backends.django.DjangoTemplates',
>         'DIRS': [],
>         'APP_DIRS': True,
>         'OPTIONS': {
>             'context_processors': [
>                 'django.template.context_processors.debug',
>                 'django.template.context_processors.request',
>                 'django.contrib.auth.context_processors.auth',
>                 'django.contrib.messages.context_processors.messages',
>             ],
>         },
>     },
> ]
>

Given that tz and i18n aren't doing anything significant, and media/static
aren'tt doing it right, this list makes sense to me as defaults.

In my ideal world, we wouldn't need to specify these at all in the settings
file - I'd almost propose that the Django template engine should have those
context processors baked in by default, unless manually specified by the
end user (i.e., if 'context_processors' in OPTIONS:). The goal of the
simplification of the project template was to get all the extra cruft out
of a default working template; having a bunch of boilerplate that many/most
new users won't need to modify seems like a step backward in that regard.

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/CAJxq849CsoMcTx7w3AQYSFMq0NZ%2BDm26CVqudeNBJ1_y%2BdMGyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to