hawat.blueprints.auth_pwd package
This pluggable module provides classical web login form with password authentication method.
Provided endpoints
/auth_pwd/login
Page providing classical web login form.
Authentication: no authentication
Methods:
GET
,POST
- hawat.blueprints.auth_pwd.BLUEPRINT_NAME = 'auth_pwd'
Name of the blueprint as module global constant.
- class hawat.blueprints.auth_pwd.LoginView[source]
Bases:
HTMLMixin
,SQLAlchemyMixin
,BaseLoginView
View enabling classical password login.
- property dbmodel
This property must be implemented in each subclass to return reference to appropriate model class based on SQLAlchemy declarative base.
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
- classmethod get_view_title(**kwargs)[source]
Return title for the view, that will be displayed in the
title
tag of HTMLhead
element and also as the content of page header inh2
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: ClassVar[Optional[Collection[str]]] = ['GET', 'POST']
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
- property search_by
Return model`s attribute (column) according to which to search for a single item.
- class hawat.blueprints.auth_pwd.PwdAuthBlueprint(name, import_name, **kwargs)[source]
Bases:
HawatBlueprint
Pluggable module - classical authentication service (auth_pwd).
- class hawat.blueprints.auth_pwd.RegisterView[source]
Bases:
HTMLMixin
,SQLAlchemyMixin
,BaseRegisterView
View enabling classical password login.
- property dbchlogmodel
This property must be implemented in each subclass to return reference to appropriate model class based on SQLAlchemy declarative base.
- property dbmodel
This property must be implemented in each subclass to return reference to appropriate model class based on SQLAlchemy declarative base.
- static get_item_form(item)[source]
Hook method. Must return instance of
flask_wtf.FlaskForm
appropriate for given item class.
Implementation of
hawat.view.BaseView.get_menu_title()
.
- classmethod get_view_title(**kwargs)[source]
Implementation of
hawat.view.BaseView.get_view_title()
.
- methods: ClassVar[Optional[Collection[str]]] = ['GET', 'POST']
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
- property search_by
Return model`s attribute (column) according to which to search for a single item.
- hawat.blueprints.auth_pwd.get_blueprint()[source]
Mandatory interface for
hawat.Hawat
and factory function. This function must return a valid instance ofhawat.app.HawatBlueprint
orflask.Blueprint
.