#694: [patch] TEMPLATE_DIRS should allow project root relative paths
--------------------------------------+-------------------------------------
Reporter: nirvdrum | Owner: adrian
Status: closed | Milestone:
Component: Template system | Version:
Resolution: wontfix | Keywords:
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
--------------------------------------+-------------------------------------
Comment (by aljungberg):
The posted solution, to have a settings file for every installation
location, is insufficient for our needs. That solution creates two
distinct problems:
1. Every developer on the project is forced to have one or more settings
files as they check out the project source code into different folders. Or
each developer hacks their settings.py file to match their own situation
which leads to merge conflicts.
2. Requiring manual changes between production and test environments
increases the risk of problems that only occur during production
deployment.
We implemented the alternative solution from adrian's last comment and I
will share it here for quick reference for other users who run into this
particular limitation.
In settings.py,
{{{
import os
PROJECT_PATH = os.path.abspath(os.path.split(__file__)[0])
TEMPLATE_DIRS = (
os.path.join(PROJECT_PATH, "templates"),
)
}}}
If this ticket is revisited in the future it is my opinion that it should
be implemented as suggested to promote 'batteries included' and 'keep it
simple' philosophies in Django.
--
Ticket URL: <http://code.djangoproject.com/ticket/694#comment:6>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---