From 1486182f84808374423927bf2a078972493b3b8c Mon Sep 17 00:00:00 2001 From: Jan Mach <jan.mach@cesnet.cz> Date: Sat, 29 Feb 2020 11:47:49 +0100 Subject: [PATCH] Refactoring: HawatApp -> VialApp. (Redmine issue: #3443) --- lib/hawat/app.py | 46 ++++++++++---------- lib/hawat/base.py | 22 +++++----- lib/hawat/blueprints/auth_api/__init__.py | 4 +- lib/hawat/blueprints/auth_dev/__init__.py | 4 +- lib/hawat/blueprints/auth_env/__init__.py | 4 +- lib/hawat/blueprints/auth_pwd/__init__.py | 4 +- lib/hawat/blueprints/changelogs/__init__.py | 4 +- lib/hawat/blueprints/dbstatus/__init__.py | 4 +- lib/hawat/blueprints/devtools/__init__.py | 4 +- lib/hawat/blueprints/dnsr/__init__.py | 4 +- lib/hawat/blueprints/events/__init__.py | 4 +- lib/hawat/blueprints/filters/__init__.py | 4 +- lib/hawat/blueprints/geoip/__init__.py | 4 +- lib/hawat/blueprints/groups/__init__.py | 4 +- lib/hawat/blueprints/hosts/__init__.py | 4 +- lib/hawat/blueprints/nerd/__init__.py | 4 +- lib/hawat/blueprints/networks/__init__.py | 4 +- lib/hawat/blueprints/pdnsr/__init__.py | 4 +- lib/hawat/blueprints/performance/__init__.py | 4 +- lib/hawat/blueprints/reports/__init__.py | 4 +- lib/hawat/blueprints/skeleton/__init__.py | 4 +- lib/hawat/blueprints/status/__init__.py | 4 +- lib/hawat/blueprints/timeline/__init__.py | 4 +- lib/hawat/blueprints/users/__init__.py | 4 +- lib/hawat/blueprints/whois/__init__.py | 4 +- 25 files changed, 80 insertions(+), 80 deletions(-) diff --git a/lib/hawat/app.py b/lib/hawat/app.py index 90447fe6..33bbe00c 100644 --- a/lib/hawat/app.py +++ b/lib/hawat/app.py @@ -90,10 +90,10 @@ def create_app_full( :param str config_file: Name of the file containing additional configurations. :param str config_env: Name of the environment variable pointing to file containing configurations. :return: Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ - app = hawat.base.HawatApp(APP_NAME) + app = hawat.base.VialApp(APP_NAME) if config_dict and isinstance(config_dict, dict): app.config.update(config_dict) @@ -127,7 +127,7 @@ def create_app(): variables. :return: Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ config_name = os.getenv('FLASK_CONFIG', 'default') config_file = hawat.config.get_default_config_file() @@ -147,9 +147,9 @@ def _setup_app_logging(app): Setup logging to file and via email for given Hawat application. Logging capabilities are adjustable by application configuration. - :param hawat.base.HawatApp app: Hawat application to be modified. + :param hawat.base.VialApp app: Hawat application to be modified. :return: Modified Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ hawat.log.setup_logging_default(app) hawat.log.setup_logging_file(app) @@ -163,9 +163,9 @@ def _setup_app_mailer(app): """ Setup mailer service for Hawat application. - :param hawat.base.HawatApp app: Hawat application to be modified. + :param hawat.base.VialApp app: Hawat application to be modified. :return: Modified Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ hawat.mailer.MAILER.init_app(app) app.mailer = hawat.mailer.MAILER @@ -183,9 +183,9 @@ def _setup_app_core(app): * Additional custom Jinja template variables * Additional custom Jinja template macros - :param hawat.base.HawatApp app: Hawat application to be modified. + :param hawat.base.VialApp app: Hawat application to be modified. :return: Modified Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ @app.errorhandler(400) def eh_badrequest(err): # pylint: disable=locally-disabled,unused-variable @@ -593,9 +593,9 @@ def _setup_app_db(app): """ Setup application database service for given Hawat application. - :param hawat.base.HawatApp app: Hawat application to be modified. + :param hawat.base.VialApp app: Hawat application to be modified. :return: Modified Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ dbcfg = hawat.db.db_settings(app) app.config['SQLALCHEMY_DATABASE_URI'] = dbcfg['url'] @@ -629,9 +629,9 @@ def _setup_app_eventdb(app): """ Setup application database service for given Hawat application. - :param hawat.base.HawatApp app: Hawat application to be modified. + :param hawat.base.VialApp app: Hawat application to be modified. :return: Modified Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ hawat.events.db_init(app) app.logger.info("Connected to event database") @@ -643,9 +643,9 @@ def _setup_app_auth(app): """ Setup application authentication features. - :param hawat.base.HawatApp app: Hawat application to be modified. + :param hawat.base.VialApp app: Hawat application to be modified. :return: Modified Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ lim = flask_login.LoginManager() @@ -703,9 +703,9 @@ def _setup_app_acl(app): """ Setup application ACL features. - :param hawat.base.HawatApp app: Hawat application to be modified. + :param hawat.base.VialApp app: Hawat application to be modified. :return: Modified Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ fpp = flask_principal.Principal(app, skip_static = True) app.set_resource(hawat.const.RESOURCE_PRINCIPAL, fpp) @@ -807,9 +807,9 @@ def _setup_app_intl(app): """ Setup application`s internationalization sybsystem. - :param hawat.base.HawatApp app: Hawat application to be modified. + :param hawat.base.VialApp app: Hawat application to be modified. :return: Modified Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ app.config["BABEL_TRANSLATION_DIRECTORIES"] = "translations;" app.config["BABEL_TRANSLATION_DIRECTORIES"] += os.path.join(app.config["MENTAT_CORE"]["__core__reporter"]["templates_dir"], "translations;") @@ -895,9 +895,9 @@ def _setup_app_menu(app): """ Setup default application menu skeleton. - :param hawat.base.HawatApp app: Hawat application to be modified. + :param hawat.base.VialApp app: Hawat application to be modified. :return: Modified Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ for entry in app.config[hawat.const.CFGKEY_HAWAT_MENU_SKELETON]: app.menu_main.add_entry(**entry) @@ -909,9 +909,9 @@ def _setup_app_blueprints(app): """ Setup application blueprints. - :param hawat.base.HawatApp app: Hawat application to be modified. + :param hawat.base.VialApp app: Hawat application to be modified. :return: Modified Hawat application - :rtype: hawat.base.HawatApp + :rtype: hawat.base.VialApp """ app.register_blueprints() diff --git a/lib/hawat/base.py b/lib/hawat/base.py index 4292aead..69c15ef7 100644 --- a/lib/hawat/base.py +++ b/lib/hawat/base.py @@ -20,7 +20,7 @@ scope of bare Flask microframework. Module contents --------------- -* :py:class:`HawatApp` +* :py:class:`VialApp` * :py:class:`HawatBlueprint` * :py:class:`HTMLMixin` * :py:class:`AJAXMixin` @@ -94,7 +94,7 @@ from mentat.datatype.sqldb import ItemChangeLogModel CRE_QNAME = re.compile(r'^([\d]+)_([a-z]{6})$') RE_UQUERY = ' AS "_mentatq\\({:d}_[^)]+\\)_"' -class HawatAppException(Exception): +class VialAppException(Exception): """ Custom class for Hawat application exceptions. """ @@ -192,7 +192,7 @@ class HawatUtils: return None -class HawatApp(flask.Flask): +class VialApp(flask.Flask): """ Custom implementation of :py:class:`flask.Flask` class. This class extends the capabilities of the base class with following additional features: @@ -201,7 +201,7 @@ class HawatApp(flask.Flask): The application configuration file contains a directive describing list of requested blueprints/modules, that should be registered into the application. This enables administrator to very easily fine tune the - application setup for each installation. See the :py:func:`hawat.base.HawatApp.register_blueprints` + application setup for each installation. See the :py:func:`hawat.base.VialApp.register_blueprints` for more information on the topic. Application main menu management @@ -291,17 +291,17 @@ class HawatApp(flask.Flask): subkey, which must contain list of string names of required blueprints. The blueprint module must provide ``get_blueprint`` factory method, that must return valid instance of :py:class:`hawat.base.HawatBlueprint`. This - method will call the :py:func:`hawat.base.HawatApp.register_blueprint` for + method will call the :py:func:`hawat.base.VialApp.register_blueprint` for each blueprint, that is being registered into the application. - :raises hawat.base.HawatAppException: In case the factory method ``get_blueprint`` is not provided by loaded module. + :raises hawat.base.VialAppException: In case the factory method ``get_blueprint`` is not provided by loaded module. """ for name in self.config[hawat.const.CFGKEY_ENABLED_BLUEPRINTS]: mod = werkzeug.utils.import_string(name) if hasattr(mod, 'get_blueprint'): self.register_blueprint(mod.get_blueprint()) else: - raise HawatAppException("Invalid blueprint module '{}', does not provide the 'get_blueprint' factory method.".format(name)) + raise VialAppException("Invalid blueprint module '{}', does not provide the 'get_blueprint' factory method.".format(name)) def log_exception(self, exc_info): """ @@ -339,7 +339,7 @@ class HawatApp(flask.Flask): if not endpoint in self.view_classes: if quiet: return None - raise HawatAppException("Unknown endpoint name '{}'.".format(endpoint)) + raise VialAppException("Unknown endpoint name '{}'.".format(endpoint)) return self.view_classes[endpoint] def can_access_endpoint(self, endpoint, **kwargs): @@ -372,7 +372,7 @@ class HawatApp(flask.Flask): return True - except HawatAppException: + except VialAppException: return False def get_resource(self, name): @@ -517,10 +517,10 @@ class HawatBlueprint(flask.Blueprint): def register_app(self, app): # pylint: disable=locally-disabled,no-self-use,unused-argument """ *Hook method:* Custom callback, which will be called from - :py:func:`hawat.base.HawatApp.register_blueprint` method and which can + :py:func:`hawat.base.VialApp.register_blueprint` method and which can perform additional tweaking of Hawat application object. - :param hawat.base.HawatApp app: Application object. + :param hawat.base.VialApp app: Application object. """ return diff --git a/lib/hawat/blueprints/auth_api/__init__.py b/lib/hawat/blueprints/auth_api/__init__.py index 6e1a899d..f172ff9b 100644 --- a/lib/hawat/blueprints/auth_api/__init__.py +++ b/lib/hawat/blueprints/auth_api/__init__.py @@ -243,13 +243,13 @@ class APIAuthBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ login_manager = app.get_resource(hawat.const.RESOURCE_LOGIN_MANAGER) principal = app.get_resource(hawat.const.RESOURCE_PRINCIPAL) diff --git a/lib/hawat/blueprints/auth_dev/__init__.py b/lib/hawat/blueprints/auth_dev/__init__.py index 57aa7075..e304bf1e 100644 --- a/lib/hawat/blueprints/auth_dev/__init__.py +++ b/lib/hawat/blueprints/auth_dev/__init__.py @@ -432,13 +432,13 @@ class DevAuthBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_anon.add_entry( 'view', diff --git a/lib/hawat/blueprints/auth_env/__init__.py b/lib/hawat/blueprints/auth_env/__init__.py index 801678e8..5afcb9b5 100644 --- a/lib/hawat/blueprints/auth_env/__init__.py +++ b/lib/hawat/blueprints/auth_env/__init__.py @@ -551,13 +551,13 @@ class EnvAuthBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_anon.add_entry( 'view', diff --git a/lib/hawat/blueprints/auth_pwd/__init__.py b/lib/hawat/blueprints/auth_pwd/__init__.py index 986a22de..2d6a0e94 100644 --- a/lib/hawat/blueprints/auth_pwd/__init__.py +++ b/lib/hawat/blueprints/auth_pwd/__init__.py @@ -219,13 +219,13 @@ class PwdAuthBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_anon.add_entry( 'view', diff --git a/lib/hawat/blueprints/changelogs/__init__.py b/lib/hawat/blueprints/changelogs/__init__.py index 36f2bd6e..14685274 100644 --- a/lib/hawat/blueprints/changelogs/__init__.py +++ b/lib/hawat/blueprints/changelogs/__init__.py @@ -216,13 +216,13 @@ class ItemChangeLogsBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/dbstatus/__init__.py b/lib/hawat/blueprints/dbstatus/__init__.py index 2a6d6e35..e09d2998 100644 --- a/lib/hawat/blueprints/dbstatus/__init__.py +++ b/lib/hawat/blueprints/dbstatus/__init__.py @@ -717,13 +717,13 @@ class DatabaseStatusBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/devtools/__init__.py b/lib/hawat/blueprints/devtools/__init__.py index d08e605f..abb66baa 100644 --- a/lib/hawat/blueprints/devtools/__init__.py +++ b/lib/hawat/blueprints/devtools/__init__.py @@ -84,13 +84,13 @@ class DevtoolsBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ self.developer_toolbar.init_app(app) diff --git a/lib/hawat/blueprints/dnsr/__init__.py b/lib/hawat/blueprints/dnsr/__init__.py index 0125a549..d42c7202 100644 --- a/lib/hawat/blueprints/dnsr/__init__.py +++ b/lib/hawat/blueprints/dnsr/__init__.py @@ -185,13 +185,13 @@ class DnsrBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ mentat.services.dnsr.init(app.mconfig) diff --git a/lib/hawat/blueprints/events/__init__.py b/lib/hawat/blueprints/events/__init__.py index fc6338ab..35b44c74 100644 --- a/lib/hawat/blueprints/events/__init__.py +++ b/lib/hawat/blueprints/events/__init__.py @@ -480,13 +480,13 @@ class EventsBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/filters/__init__.py b/lib/hawat/blueprints/filters/__init__.py index b4489763..d005e422 100644 --- a/lib/hawat/blueprints/filters/__init__.py +++ b/lib/hawat/blueprints/filters/__init__.py @@ -858,13 +858,13 @@ class FiltersBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/geoip/__init__.py b/lib/hawat/blueprints/geoip/__init__.py index 26e3c928..5716d3e0 100644 --- a/lib/hawat/blueprints/geoip/__init__.py +++ b/lib/hawat/blueprints/geoip/__init__.py @@ -193,13 +193,13 @@ class GeoipBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ mentat.services.geoip.init(app.mconfig) diff --git a/lib/hawat/blueprints/groups/__init__.py b/lib/hawat/blueprints/groups/__init__.py index e9f82048..50c69e46 100644 --- a/lib/hawat/blueprints/groups/__init__.py +++ b/lib/hawat/blueprints/groups/__init__.py @@ -937,13 +937,13 @@ class GroupsBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ def _fetch_my_groups(): diff --git a/lib/hawat/blueprints/hosts/__init__.py b/lib/hawat/blueprints/hosts/__init__.py index e7ccf03b..70986d0a 100644 --- a/lib/hawat/blueprints/hosts/__init__.py +++ b/lib/hawat/blueprints/hosts/__init__.py @@ -183,13 +183,13 @@ class HostsBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/nerd/__init__.py b/lib/hawat/blueprints/nerd/__init__.py index b8848ed9..1d066783 100644 --- a/lib/hawat/blueprints/nerd/__init__.py +++ b/lib/hawat/blueprints/nerd/__init__.py @@ -185,13 +185,13 @@ class NerdBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ mentat.services.nerd.init(app.mconfig) diff --git a/lib/hawat/blueprints/networks/__init__.py b/lib/hawat/blueprints/networks/__init__.py index ae8f0767..a18b6e3c 100644 --- a/lib/hawat/blueprints/networks/__init__.py +++ b/lib/hawat/blueprints/networks/__init__.py @@ -455,13 +455,13 @@ class NetworksBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/pdnsr/__init__.py b/lib/hawat/blueprints/pdnsr/__init__.py index 6c66230a..705a8bbd 100644 --- a/lib/hawat/blueprints/pdnsr/__init__.py +++ b/lib/hawat/blueprints/pdnsr/__init__.py @@ -190,13 +190,13 @@ class PDNSRBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ mentat.services.pdnsr.init(app.mconfig) diff --git a/lib/hawat/blueprints/performance/__init__.py b/lib/hawat/blueprints/performance/__init__.py index 9ea273de..0f826cd2 100644 --- a/lib/hawat/blueprints/performance/__init__.py +++ b/lib/hawat/blueprints/performance/__init__.py @@ -153,13 +153,13 @@ class PerformanceBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/reports/__init__.py b/lib/hawat/blueprints/reports/__init__.py index b93464bb..000751b5 100644 --- a/lib/hawat/blueprints/reports/__init__.py +++ b/lib/hawat/blueprints/reports/__init__.py @@ -647,13 +647,13 @@ class ReportsBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/skeleton/__init__.py b/lib/hawat/blueprints/skeleton/__init__.py index a90ca799..d7ae6fe5 100644 --- a/lib/hawat/blueprints/skeleton/__init__.py +++ b/lib/hawat/blueprints/skeleton/__init__.py @@ -82,13 +82,13 @@ class SkeletonBlueprint(hawat.base.HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/status/__init__.py b/lib/hawat/blueprints/status/__init__.py index 58f15591..ae22b424 100644 --- a/lib/hawat/blueprints/status/__init__.py +++ b/lib/hawat/blueprints/status/__init__.py @@ -125,13 +125,13 @@ class StatusBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/timeline/__init__.py b/lib/hawat/blueprints/timeline/__init__.py index 238ac935..edf34b3b 100644 --- a/lib/hawat/blueprints/timeline/__init__.py +++ b/lib/hawat/blueprints/timeline/__init__.py @@ -207,13 +207,13 @@ class TimelineBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/users/__init__.py b/lib/hawat/blueprints/users/__init__.py index 8110380f..42f42024 100644 --- a/lib/hawat/blueprints/users/__init__.py +++ b/lib/hawat/blueprints/users/__init__.py @@ -1006,13 +1006,13 @@ class UsersBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', diff --git a/lib/hawat/blueprints/whois/__init__.py b/lib/hawat/blueprints/whois/__init__.py index 1dd20f3e..50444348 100644 --- a/lib/hawat/blueprints/whois/__init__.py +++ b/lib/hawat/blueprints/whois/__init__.py @@ -191,13 +191,13 @@ class WhoisBlueprint(HawatBlueprint): def register_app(self, app): """ - *Callback method*. Will be called from :py:func:`hawat.base.HawatApp.register_blueprint` + *Callback method*. Will be called from :py:func:`hawat.base.VialApp.register_blueprint` method and can be used to customize the Flask application object. Possible use cases: * application menu customization - :param hawat.base.HawatApp app: Flask application to be customize. + :param hawat.base.VialApp app: Flask application to be customized. """ app.menu_main.add_entry( 'view', -- GitLab