djblets.siteconfig.context_processors¶
Template context processors for SiteConfiguration information.
- siteconfig(request)[source]¶
Return context variables for accessing site configuration data.
This will provide templates with a
siteconfig
variable, representing the currentSiteConfiguration
for the installation, andsiteconfig_settings
, representing all settings on the current configuration.siteconfig_settings
is preferred over accessingsiteconfig.settings
, as it will properly handle returning default values.- Parameters
request (django.http.HttpRequest) – The current HTTP request.
- Returns
A dictionary with
siteconfig
andsiteconfig_settings
keys.- Return type
- settings_vars(request)[source]¶
Return context variables for accessing Django settings.
This will provide templates with a
settings
variable, which represents the Django settings object.- Parameters
request (django.http.HttpRequest) – The current HTTP request.
- Returns
A dictionary with a
settings
key.- Return type