|
@@ -15,17 +15,17 @@ def activate_theme(theme):
|
|
if theme[0] == '_':
|
|
if theme[0] == '_':
|
|
raise ValueError('"%s" is a template package, not a theme.' % theme[1:])
|
|
raise ValueError('"%s" is a template package, not a theme.' % theme[1:])
|
|
|
|
|
|
- _thread_local.misago_theme = theme;
|
|
|
|
- _thread_local.misago_template_mutex = False
|
|
|
|
|
|
+ _thread_local.theme = theme;
|
|
|
|
+ _thread_local.template_mutex = False
|
|
|
|
|
|
|
|
|
|
def reset_theme():
|
|
def reset_theme():
|
|
- _thread_local.misago_theme = settings.INSTALLED_THEMES[0];
|
|
|
|
|
|
+ _thread_local.theme = settings.INSTALLED_THEMES[0];
|
|
|
|
|
|
|
|
|
|
def active_theme():
|
|
def active_theme():
|
|
try:
|
|
try:
|
|
- return _thread_local.misago_theme
|
|
|
|
|
|
+ return _thread_local.theme
|
|
except AttributeError:
|
|
except AttributeError:
|
|
return None
|
|
return None
|
|
|
|
|
|
@@ -33,10 +33,10 @@ def active_theme():
|
|
def prefix_templates(templates, dictionary=None):
|
|
def prefix_templates(templates, dictionary=None):
|
|
templates = process_templates(templates, dictionary)
|
|
templates = process_templates(templates, dictionary)
|
|
if isinstance(templates, str):
|
|
if isinstance(templates, str):
|
|
- return ('%s/%s' % (_thread_local.misago_theme, templates), templates)
|
|
|
|
|
|
+ return ('%s/%s' % (_thread_local.theme, templates), templates)
|
|
else:
|
|
else:
|
|
prefixed = []
|
|
prefixed = []
|
|
for template in templates:
|
|
for template in templates:
|
|
- prefixed.append('%s/%s' % (_thread_local.misago_theme, template))
|
|
|
|
|
|
+ prefixed.append('%s/%s' % (_thread_local.theme, template))
|
|
prefixed += templates
|
|
prefixed += templates
|
|
return tuple(prefixed)
|
|
return tuple(prefixed)
|