Bases: horizon.views.HorizonTemplateView
A quick class-based view for putting API data into a template.
Subclasses must define one method, get_data, and a template name via the template_name attribute on the class.
Errors within the get_data function are automatically caught by the horizon.exceptions.handle() error handler if not otherwise caught.
This method should handle any necessary API calls, update the context object, and return the context object at the end.
Bases: horizon.views.PageTitleMixin, django.views.generic.edit.FormView
Bases: horizon.views.PageTitleMixin, django.views.generic.base.TemplateView
Bases: object
A mixin that renders out a page title into a view.
Many views in horizon have a page title that would ordinarily be defined and passed through in get_context_data function, this often leads to a lot of duplicated work in each view.
This mixin standardises the process of defining a page title, letting views simply define a variable that is rendered into the context for them.
There are cases when page title in a view may also display some context data, for that purpose the page_title variable supports the django templating language and will be rendered using the context defined by the views get_context_data.
This function takes in a context dict and uses it to render the page_title variable, it then appends this title to the context using the ‘page_title’ key. If there is already a page_title key defined in context received then this function will do nothing.
This is an override of the default render_to_response function that exists in the django generic views, this is here to inject the page title into the context before the main template is rendered.
Reversible named view to direct a user to the appropriate homepage.