fix base template loading
This commit is contained in:
parent
f704453da8
commit
dae66475ba
|
@ -4,11 +4,13 @@ from django.conf import settings
|
|||
from django.template.loader import get_template, TemplateDoesNotExist
|
||||
|
||||
def theme_base(request):
|
||||
base = get_template('uauth/base.html')
|
||||
|
||||
if request.session.get('organization'):
|
||||
try:
|
||||
base = get_template('base.html', [os.path.join(settings.ORGANIZATIONS_DIR,
|
||||
request.session['organization'], 'templates')])
|
||||
except TemplateDoesNotExist:
|
||||
base = get_template('uauth/base.html')
|
||||
pass
|
||||
|
||||
return {'theme_base': base}
|
||||
|
|
Reference in New Issue