hawat.blueprints.devtools package¶
This pluggable module provides various utility and development tools.
-
hawat.blueprints.devtools.
BLUEPRINT_NAME
= 'devtools'¶ Name of the blueprint as module global constant.
-
class
hawat.blueprints.devtools.
ConfigView
[source]¶ Bases:
hawat.view.mixin.HTMLMixin
,hawat.view.SimpleView
View for displaying current application configuration and environment.
-
authentication
= True¶
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_icon
()[source]¶ Return menu entry icon name for the view. Given name will be used as index to built-in icon registry.
Default implementation generates the icon name by concatenating the prefix
module-
with module name.- Returns
View icon.
- Return type
str
-
classmethod
get_view_name
()[source]¶ Return unique name for the view. Name must be unique in the namespace of parent blueprint/module and should contain only characters
[a-z0-9]
. It will be used for generating endpoint name for the view.This method does not have any default implementation and must be overridden by a subclass.
- Returns
Name 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
-
-
class
hawat.blueprints.devtools.
DevtoolsBlueprint
(name, import_name, **kwargs)[source]¶ Bases:
hawat.base.HawatBlueprint
Pluggable module - development tools (devtools).
-
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¶
-
classmethod
-
hawat.blueprints.devtools.
get_blueprint
()[source]¶ Mandatory interface for
hawat.Hawat
and factory function. This function must return a valid instance ofhawat.app.HawatBlueprint
orflask.Blueprint
.