root / uauth / context_processors.py @ f4843b93
1 |
import os |
---|---|
2 |
|
3 |
from django.conf import settings |
4 |
from django.template.loader import get_template, TemplateDoesNotExist |
5 |
|
6 |
def theme_base(request): |
7 |
if request.session.get('organization'): |
8 |
try: |
9 |
base = get_template('base.html', [os.path.join(settings.ORGANIZATIONS_DIR, |
10 |
request.session['organization'], 'templates')]) |
11 |
except TemplateDoesNotExist: |
12 |
base = get_template('uauth/base.html') |
13 |
|
14 |
return {'theme_base': base} |