hawat.blueprints.users package

Description

This pluggable module provides access to user account management features. These features include:

  • general user account listing

  • detailed user account view

  • creating new user accounts

  • updating existing user accounts

  • deleting existing user accounts

  • enabling existing user accounts

  • disabling existing user accounts

hawat.blueprints.users.BLUEPRINT_NAME = 'users'

Name of the blueprint as module global constant.

class hawat.blueprints.users.CreateView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.ItemCreateView

View for creating new user accounts.

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

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

static get_item_form()[source]

Implementation of hawat.base.ItemCreateView.get_item_form().

classmethod get_menu_icon()[source]

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

static get_message_cancel(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_cancel().

static get_message_failure(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_failure().

static get_message_success(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_success().

classmethod get_view_title(item=None)[source]

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

methods = ['GET', 'POST']
class hawat.blueprints.users.DeleteView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.ItemDeleteView

View for deleting existing user accounts.

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

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

classmethod get_menu_icon()[source]

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

classmethod get_menu_legend(item=None)[source]

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

static get_message_cancel(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_cancel().

static get_message_failure(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_failure().

static get_message_success(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_success().

methods = ['GET', 'POST']
class hawat.blueprints.users.DisableView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.ItemDisableView

View for deleting existing user accounts.

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

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

classmethod get_menu_icon()[source]

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

classmethod get_menu_legend(item=None)[source]

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

static get_message_cancel(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_cancel().

static get_message_failure(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_failure().

static get_message_success(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_success().

methods = ['GET', 'POST']
class hawat.blueprints.users.EnableView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.ItemEnableView

View for enabling existing user accounts.

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

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

do_after_action(item)[source]

Implementation of hawat.base.ItemActionView.do_after_action().

classmethod get_menu_icon()[source]

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

classmethod get_menu_legend(item=None)[source]

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

static get_message_cancel(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_cancel().

static get_message_failure(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_failure().

static get_message_success(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_success().

methods = ['GET', 'POST']
class hawat.blueprints.users.ListView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.ItemListView

General user account listing.

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

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

classmethod get_action_menu()[source]

Implementation of hawat.base.ItemListView.get_action_menu().

classmethod get_context_action_menu()[source]

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

classmethod get_menu_title(item=None)[source]

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

methods = ['GET']
class hawat.blueprints.users.MeView[source]

Bases: hawat.blueprints.users.ShowView

Detailed user account view for currently logged-in user.

authentication = True
classmethod authorize_item_action(item)[source]

Perform access authorization for current user to particular item.

dispatch_request()[source]

Mandatory interface required by the flask.views.View.dispatch_request(). Will be called by the Flask framework to service the request.

Single item with given unique identifier will be retrieved from database and injected into template to be displayed to the user.

classmethod get_breadcrumbs_menu()[source]

Get breadcrumbs menu.

classmethod get_menu_icon()[source]

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

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

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]

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

classmethod get_view_title(item=None)[source]

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

methods = ['GET']
class hawat.blueprints.users.ShowView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.ItemShowView

Detailed user account view.

authentication = True
classmethod authorize_item_action(item)[source]

Perform access authorization for current user to particular item.

dbmodel

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

do_before_response(**kwargs)[source]

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

classmethod get_action_menu()[source]

Get action menu for particular item.

classmethod get_menu_icon()[source]

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

classmethod get_menu_legend(item=None)[source]

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

classmethod get_view_title(item=None)[source]

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

methods = ['GET']
class hawat.blueprints.users.UpdateView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.ItemUpdateView

View for updating existing user accounts.

authentication = True
classmethod authorize_item_action(item=None)[source]

Perform access authorization for current user to particular item.

dbmodel

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

static get_item_form(item)[source]

Implementation of hawat.base.ItemUpdateView.get_item_form().

classmethod get_menu_icon()[source]

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

classmethod get_menu_legend(item=None)[source]

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

static get_message_cancel(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_cancel().

static get_message_failure(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_failure().

static get_message_success(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_success().

classmethod get_view_title(item=None)[source]

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

methods = ['GET', 'POST']
class hawat.blueprints.users.UsersBlueprint(name, import_name, **kwargs)[source]

Bases: hawat.base.HawatBlueprint

Hawat pluggable module - users.

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.users.get_blueprint()[source]

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