I'm trying Django 1.7.
This is my TEMPLATE_DIRS setting:
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/')
)
which is fine for Django 1.6, but doesn't work for Django 1.7.
Can someone explains this?
Thx!!
You need a trailing ,
for it to be a tuple, see below, the last ,
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/'),
)
When there's a single element in the tuple you need to leave a trailing comma at the end, e.g. (a,)
is a tuple with single element a
, but (a)
just resolves to whatever a
is.
Try This Should Work , It Works For Me All The Times
TEMPLATE_DIRS = os.path.join(BASE_DIR , 'templates')