Jump to >

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 current SiteConfiguration for the installation, and siteconfig_settings, representing all settings on the current configuration.

siteconfig_settings is preferred over accessing siteconfig.settings, as it will properly handle returning default values.

Parameters:request (django.http.HttpRequest) – The current HTTP request.
Returns:A dictionary with siteconfig and siteconfig_settings keys.
Return type:dict
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:dict