hawat.blueprints.changelogs package

This pluggable module provides access to item changelogs.

hawat.blueprints.changelogs.BLUEPRINT_NAME = 'changelogs'

Name of the blueprint as module global constant.

class hawat.blueprints.changelogs.ItemChangeLogsBlueprint(name, import_name, **kwargs)[source]

Bases: hawat.base.HawatBlueprint

Pluggable module - item changelog record management (changelogs).

classmethod get_module_title()[source]

Get human readable name for this blueprint/module.

Returns

Name (short summary) of the blueprint/module.

Return type

str

name = None
register_app(app)[source]

Hook method: Custom callback, which will be called from hawat.app.Hawat.register_blueprint() method and which can perform additional tweaking of Hawat application object.

Parameters

app (hawat.app.Hawat) – Application object.

class hawat.blueprints.changelogs.SearchView[source]

Bases: hawat.view.mixin.HTMLMixin, hawat.view.mixin.SQLAlchemyMixin, hawat.view.BaseSearchView

General item changelog record listing.

authentication = True
authorization = [<Permission needs={Need(method='role', value='maintainer'), Need(method='role', value='admin')} excludes=set()>]
static build_query(query, model, form_args)[source]

Hook method. Modify given query according to the given arguments.

property dbmodel

This property must be implemented in each subclass to return reference to appropriate model class based on SQLAlchemy declarative base.

classmethod get_context_action_menu()[source]

Implementation of hawat.view.ItemListView.get_context_action_menu().

classmethod get_menu_title(**kwargs)[source]

Return menu entry title for the view.

Default implementation returns the return value of hawat.view.BaseView.get_view_title() method by default.

Parameters

kwargs (dict) – Optional parameters.

Returns

Menu entry title for the view.

Return type

str

static get_search_form(request_args)[source]

Must return instance of flask_wtf.FlaskForm appropriate for searching given type of items.

classmethod get_view_title(**kwargs)[source]

Return title for the view, that will be displayed in the title tag of HTML head element and also as the content of page header in h2 tag.

Default implementation returns the return value of hawat.view.BaseView.get_menu_title() method by default.

Parameters

kwargs (dict) – Optional parameters.

Returns

Title for the view.

Return type

str

methods: Optional[List[str]] = ['GET']
class hawat.blueprints.changelogs.ShowView[source]

Bases: hawat.view.mixin.HTMLMixin, hawat.view.mixin.SQLAlchemyMixin, hawat.view.ItemShowView

Detailed network record view.

authentication = True
authorization = [<Permission needs={Need(method='role', value='maintainer'), Need(method='role', value='admin')} excludes=set()>]
property dbmodel

This property must be implemented in each subclass to return reference to appropriate model class based on SQLAlchemy declarative base.

classmethod get_breadcrumbs_menu()[source]

Get breadcrumbs menu.

classmethod get_menu_legend(**kwargs)[source]

Return menu entry legend for the view (menu entry hover tooltip).

Default implementation returns the return value of hawat.view.BaseView.get_menu_title() method by default.

Parameters

kwargs (dict) – Optional parameters.

Returns

Menu entry legend for the view.

Return type

str

classmethod get_menu_title(**kwargs)[source]

Implementation of hawat.view.BaseView.get_menu_title().

classmethod get_view_title(**kwargs)[source]

Implementation of hawat.view.BaseView.get_view_title().

methods: Optional[List[str]] = ['GET']
hawat.blueprints.changelogs.get_blueprint()[source]

Mandatory interface for hawat.Hawat and factory function. This function must return a valid instance of hawat.app.HawatBlueprint or flask.Blueprint.