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.

name

A short name or slug for the browser.

verbose_name

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

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".

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".

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".

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".

template

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

context_var_name

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

has_breadcrumb

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

breadcrumb_template

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

breadcrumb_template = 'horizon/common/_breadcrumb.html'
breadcrumb_url = None
check_table_class(cls, attr_name)[source]
content_kwarg_name = 'content_kwarg'
content_table_class = None
context_var_name = 'browser'
has_breadcrumb = False
name = None
navigable_item_name = <django.utils.functional.__proxy__ object at 0x7faf887d80d0>
navigation_kwarg_name = 'navigation_kwarg'
navigation_table_class = None
prepare_breadcrumb(tables, navigation_item, content_path)[source]
render()[source]
set_tables(tables)[source]

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

template = 'horizon/common/_resource_browser.html'
verbose_name = None

Previous topic

The horizon.browsers Module

Next topic

The horizon.management Module

Project Source

This Page