hawat.blueprints.skeleton package

Description

This pluggable module is a highly commented skeleton and an example implementation.

hawat.blueprints.skeleton.BLUEPRINT_NAME = 'skeleton'

Name of the blueprint as module global constant.

class hawat.blueprints.skeleton.ExampleView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SimpleView

Example simple view.

decorators = [<function login_required>]
do_before_response(**kwargs)[source]

Implementation of hawat.base.RenderableView.do_before_response().

classmethod get_menu_icon()[source]

Implementation of hawat.base.BaseView.get_menu_icon().

classmethod get_menu_title(item=None)[source]

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

classmethod get_view_name()[source]

Implementation of hawat.base.BaseView.get_view_name().

classmethod get_view_template()[source]

Return Jinja2 template file that should be used for rendering the view content. This default implementation works only in case the view class was properly registered into the parent blueprint/module with hawat.base.HawatBlueprint.register_view_class() method.

Returns

Jinja2 template file to use to render the view.

Return type

str

classmethod get_view_title(item=None)[source]

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

methods = ['GET']
class hawat.blueprints.skeleton.SkeletonBlueprint(name, import_name, **kwargs)[source]

Bases: hawat.base.HawatBlueprint

Hawat pluggable module - skeleton.

classmethod get_module_title()[source]

Implementation of hawat.base.HawatBlueprint.get_module_title().

register_app(app)[source]

Callback method. Will be called from hawat.base.HawatApp.register_blueprint() method and can be used to customize the Flask application object. Possible use cases:

  • application menu customization

Parameters

app (hawat.base.HawatApp) – Flask application to be customize.

hawat.blueprints.skeleton.get_blueprint()[source]

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