1
# Copyright 2010 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
5
Request processors return dictionaries to be merged into a
6
template context. Each function takes the request object as its only parameter
7
and returns a dictionary to add to the context.
9
These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by
13
from django.conf import settings
15
from identityprovider.branding import current_brand
18
def readonly(request):
19
return {'readonly': getattr(settings, 'READ_ONLY_MODE', False)}
22
def branding(request):
24
'template_dir': current_brand.template_dir,
25
'sso_brand_name': u'%s' % current_brand.name,
26
'brand': current_brand,