work on clandestine

This commit is contained in:
Kevin Froman 2019-03-29 12:37:51 -05:00
parent e1c62fee5b
commit 815f1b1d4e
10 changed files with 64 additions and 16 deletions

View file

@ -19,11 +19,11 @@
'''
import onionrplugins
def load_plugin_blueprints(flaskapp):
def load_plugin_blueprints(flaskapp, blueprint='flask_blueprint'):
'''Iterate enabled plugins and load any http endpoints they have'''
for plugin in onionrplugins.get_enabled_plugins():
plugin = onionrplugins.get_plugin(plugin)
try:
flaskapp.register_blueprint(getattr(plugin, 'flask_blueprint'))
flaskapp.register_blueprint(getattr(plugin, blueprint))
except AttributeError:
pass