#25079: Warn if both TEMPLATES and TEMPLATE_DIRS are defined
--------------------------------------+--------------------
     Reporter:  danielr               |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Template system       |    Version:  1.8
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  1
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 Since the addition of the pluggable template backends, the `TEMPLATE_DIRS`
 setting has been deprecated in favour of the `TEMPLATES` list of dicts. If
 `TEMPLATES` is not defined, it will be constructed using the value of
 `TEMPLATE_DIRS`.

 However, `TEMPLATES` is created automatically by the default project
 template; and in this case Django does not use the value in
 `TEMPLATE_DIRS`. This means that users following pre-1.8 tutorials (for
 example, the very popular Tango with Django) will be instructed to add
 `TEMPLATE_DIRS` to a settings file that ignores that value, and then will
 be surprised that their templates are not found. This has hit quite a few
 users on StackOverflow, for example:

 http://stackoverflow.com/questions/31108314/templatedoesnotexist-error-in-
 django/31109213
 http://stackoverflow.com/questions/30844500/django-templatedoesnotexist-
 error-on-windows-machine
 http://stackoverflow.com/questions/30740700/django-templatedoesnotexist-
 at-home-html
 http://stackoverflow.com/questions/26176267/django-template-loader-cant-
 find-template/30588425#30588425

 and so on.

 Django should explicitly warn in this case, telling users to move their
 directories settings to `TEMPLATES`.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.8ca01c84e22da861c163f92632dbc228%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to