Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to add to original TEMPLATE_DIRS settings.py
## settings.py
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
)
try:
from local_settings import *
except Exception:
pass
## local_settngs.py
# tried with append
TEMPLATE_DIRS.append(os.path.abspath(os.path.join(os.path.dirname(__file__),
'../../ODC-overlay/templates')))
# tried calling the var
TEMPLATE_DIRS = (
os.path.abspath(os.path.join(os.path.dirname(__file__),
'../../ODC-overlay/templates')),
TEMPLATE_DIRS
)
# tried with the plus append
TEMPLATE_DIRS = ( os.path.abspath(os.path.join(os.path.dirname(__file__),
'../../ODC-overlay/templates')) ) + TEMPLATE_DIRS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment