Skip to content

Commit 9c46807

Browse files
committed
Fix template loader issue.
Based on gregmuellegger#76
1 parent f59ee73 commit 9c46807

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

django_mobile/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ class defaults(object):
3030
FLAVOURS_COOKIE_HTTPONLY = False
3131
FLAVOURS_SESSION_KEY = u'flavour'
3232
FLAVOURS_TEMPLATE_LOADERS = []
33+
34+
DEFAULT_TEMPLATE_LOADERS = []
35+
for template_engine in django_settings.TEMPLATES:
36+
DEFAULT_TEMPLATE_LOADERS += template_engine.get(
37+
'OPTIONS', {}).get('loaders', [])
38+
3339
for loader in django_settings.TEMPLATE_LOADERS:
3440
if isinstance(loader, (tuple, list)) and loader[0] == CACHE_LOADER_NAME:
3541
for cached_loader in loader[1]:
@@ -39,4 +45,5 @@ class defaults(object):
3945
FLAVOURS_TEMPLATE_LOADERS.append(loader)
4046
FLAVOURS_TEMPLATE_LOADERS = tuple(FLAVOURS_TEMPLATE_LOADERS)
4147

48+
4249
settings = SettingsProxy(django_settings, defaults)

0 commit comments

Comments
 (0)