root / uauth / context_processors.py @ master
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 |
base = get_template('uauth/base.html') |
8 |
|
9 |
if request.session.get('organization'): |
10 |
try: |
11 |
base = get_template('base.html', [os.path.join(settings.ORGANIZATIONS_DIR, |
12 |
request.session['organization'], 'templates')]) |
13 |
except TemplateDoesNotExist: |
14 |
pass
|
15 |
|
16 |
return {'theme_base': base} |