hawat.blueprints.groups package

This file contains pluggable module for Hawat web interface containing features related to user group management. These features include:

  • general group listing

  • detailed group view

  • creating new groups

  • updating existing groups

  • deleting existing groups

  • enabling existing groups

  • disabling existing groups

  • adding group members

  • removing group members

  • rejecting group membership requests

class hawat.blueprints.groups.CreateView[source]

Bases: vial.blueprints.groups.CreateView

View for creating new groups.


Hook method. Will be called before any action handling tasks.

static get_item_form(item)[source]

Hook method. Must return instance of flask_wtf.FlaskForm appropriate for given item class.

class hawat.blueprints.groups.GroupsBlueprint(name, import_name, **kwargs)[source]

Bases: vial.blueprints.groups.GroupsBlueprint

Pluggable module - user groups (groups).


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


app (vial.app.Vial) – Application object.

class hawat.blueprints.groups.ShowByNameView[source]

Bases: hawat.blueprints.groups.ShowView

Detailed group view by group name.

classmethod get_view_name()[source]

Implementation of vial.view.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 vial.app.VialBlueprint.register_view_class() method.


Jinja2 template file to use to render the view.

Return type


property search_by

Return model`s attribute (column) according to which to search for a single item.

class hawat.blueprints.groups.ShowView[source]

Bases: vial.blueprints.groups.ShowView

Detailed group view.


This method will be called just before generating the response. By providing some meaningfull implementation you can use it for some simple item and response context mangling tasks.


kwargs – Custom additional arguments.

class hawat.blueprints.groups.UpdateView[source]

Bases: vial.blueprints.groups.UpdateView

View for updating existing groups.

static get_item_form(item)[source]

Hook method. Must return instance of flask_wtf.FlaskForm appropriate for given item class.


Mandatory interface for vial.Vial and factory function. This function must return a valid instance of vial.app.VialBlueprint or flask.Blueprint.