python - Django tuple checking: TEMPLATE_DIRS should be tuple? -
python - Django tuple checking: TEMPLATE_DIRS should be tuple? -
i'm trying django 1.7.
this template_dirs setting:
template_dirs = ( os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/') )
which fine django 1.6, doesn't work django 1.7.
can explains this? thx!!
you need trailing ,
tuple, see below, lastly ,
template_dirs = ( os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/'), )
when there's single element in tuple need leave trailing comma @ end, e.g. (a,)
tuple single element a
, (a)
resolves whatever a
is.
python django tuples django-1.7
Comments
Post a Comment