plugins: refactor initialization

add a new function "init" call when the app starts.
The function can:
* return False to disable the plugin.
* modify the Flask app.
This commit is contained in:
Alexandre Flament 2021-09-13 19:37:51 +02:00
parent adeb084cf4
commit 2b4fef7118
5 changed files with 248 additions and 188 deletions

View file

@ -200,8 +200,8 @@ SCHEMA = {
'networks': {
},
},
'plugins': SettingsValue((None, list), None),
'enabled_plugins': SettingsValue(list, []),
'plugins': SettingsValue(list, []),
'enabled_plugins': SettingsValue((None, list), None),
'checker': {
'off_when_debug': SettingsValue(bool, True),
},