The horizon.browsers.base Module

class horizon.browsers.base.ResourceBrowser(request, tables_dict=None, attrs=None, **kwargs)[source]

Bases: horizon.utils.html.HTMLElement

A class which defines a browser for displaying data.

horizon.browsers.base.name

A short name or slug for the browser.

horizon.browsers.base.verbose_name

A more verbose name for the browser meant for display purposes.

horizon.browsers.base.navigation_table_class

This table displays data on the left side of the browser. Set the navigation_table_class attribute with the desired DataTable class. This table class must set browser_table attribute in Meta to "navigation".

horizon.browsers.base.content_table_class

This table displays data on the right side of the browser. Set the content_table_class attribute with the desired DataTable class. This table class must set browser_table attribute in Meta to "content".

horizon.browsers.base.navigation_kwarg_name

This attribute represents the key of the navigatable items in the kwargs property of this browser’s view. Defaults to "navigation_kwarg".

horizon.browsers.base.content_kwarg_name

This attribute represents the key of the content items in the kwargs property of this browser’s view. Defaults to "content_kwarg".

horizon.browsers.base.template

String containing the template which should be used to render the browser. Defaults to "horizon/common/_resource_browser.html".

horizon.browsers.base.context_var_name

The name of the context variable which will contain the browser when it is rendered. Defaults to "browser".

horizon.browsers.base.has_breadcrumb

Indicates if the content table of the browser would have breadcrumb. Defaults to false.

horizon.browsers.base.breadcrumb_template

This is a template used to render the breadcrumb. Defaults to "horizon/common/_breadcrumb.html".

ResourceBrowser.check_table_class(cls, attr_name)[source]
ResourceBrowser.prepare_breadcrumb(tables, navigation_item, content_path)[source]
ResourceBrowser.render()[source]
ResourceBrowser.set_tables(tables)[source]

Sets the table instances on the browser from a dictionary mapping table names to table instances (as constructed by MultiTableView).

Previous topic

The horizon.utils.secret_key Module

Next topic

The horizon.browsers Module

This Page