This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
u-auth/uauth/context_processors.py

15 lines
485 B
Python

import os
from django.conf import settings
from django.template.loader import get_template, TemplateDoesNotExist
def theme_base(request):
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')
return {'theme_base': base}