The horizon.tabs.views Module¶
-
class
horizon.tabs.views.TabView[source] Bases:
horizon.views.HorizonTemplateViewA generic class-based view for displaying a
horizon.tabs.TabGroup.This view handles selecting specific tabs and deals with AJAX requests gracefully.
-
tab_group_class¶ The only required attribute for
TabView. It should be a class which inherits fromhorizon.tabs.TabGroup.
-
get(request, *args, **kwargs)[source]
-
get_context_data(**kwargs)[source] Adds the
tab_groupvariable to the context data.
-
get_tabs(request, **kwargs)[source] Returns the initialized tab group for this view.
-
handle_tabbed_response(tab_group, context)[source] Sends back an AJAX-appropriate response for the tab group if required, otherwise renders the response as normal.
-
render_to_response(*args, **kwargs)[source]
-
tab_group_class= None
-
-
class
horizon.tabs.views.TabbedTableView(*args, **kwargs)[source] Bases:
horizon.tables.views.MultiTableMixin,horizon.tabs.views.TabView-
get(request, *args, **kwargs)[source]
-
get_tables()[source] A no-op on this class. Tables are handled at the tab level.
-
handle_table(table_dict)[source] For the given dict containing a
DataTableand aTableTabinstance, it loads the table data for that tab and calls the table’smaybe_handle()method. The return value will be the result ofmaybe_handle.
-
load_tabs()[source] Loads the tab group, and compiles the table instances for each table attached to any
horizon.tabs.TableTabinstances on the tab group. This step is necessary before processing any tab or table actions.
-
post(request, *args, **kwargs)[source]
-