The horizon.context_processors ModuleΒΆ

Context processors used by Horizon.

horizon.context_processors.horizon(request)[source]

The main Horizon context processor. Required for Horizon to function.

The following variables are added to the request context:

authorized_tenants
A list of tenant objects which the current user has access to.

regions

A dictionary containing information about region support, the current region, and available regions.

Additionally, it sets the names True and False in the context to their boolean equivalents for convenience.

Warning

Don’t put API calls in context processors; they will be called once for each template/template fragment which takes context that is used to render the complete output.

Previous topic

The horizon.decorators Module

Next topic

The horizon.middleware Module

This Page