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.breadcrumb_template = 'horizon/common/_breadcrumb.html'
ResourceBrowser.breadcrumb_url = None
ResourceBrowser.check_table_class(cls, attr_name)[source]
ResourceBrowser.content_kwarg_name = 'content_kwarg'
ResourceBrowser.content_table_class = None
ResourceBrowser.context_var_name = 'browser'
ResourceBrowser.has_breadcrumb = False
ResourceBrowser.name = None
ResourceBrowser.navigable_item_name = <django.utils.functional.__proxy__ object at 0x772a310>
ResourceBrowser.navigation_kwarg_name = 'navigation_kwarg'
ResourceBrowser.navigation_table_class = None
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).

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

Previous topic

The horizon.browsers.views Module

Next topic

The horizon.browsers.breadcrumb Module

This Page