fix(core) Fix entry point name
This commit is contained in:
parent
50632eb333
commit
60ba8d4799
|
@ -38,7 +38,7 @@ class CustomJSONEncoder(JSONEncoder):
|
||||||
def __load_plugins(app):
|
def __load_plugins(app):
|
||||||
logger.info("Search for plugins")
|
logger.info("Search for plugins")
|
||||||
app.config["FG_PLUGINS"] = {}
|
app.config["FG_PLUGINS"] = {}
|
||||||
for entry_point in pkg_resources.iter_entry_points("flaschengeist.plugin"):
|
for entry_point in pkg_resources.iter_entry_points("flaschengeist.plugins"):
|
||||||
logger.debug("Found plugin: >{}<".format(entry_point.name))
|
logger.debug("Found plugin: >{}<".format(entry_point.name))
|
||||||
plugin = None
|
plugin = None
|
||||||
if entry_point.name in config and config[entry_point.name].get("enabled", False):
|
if entry_point.name in config and config[entry_point.name].get("enabled", False):
|
||||||
|
@ -111,7 +111,7 @@ def create_app(test_config=None):
|
||||||
@app.after_request
|
@app.after_request
|
||||||
def after_request(response):
|
def after_request(response):
|
||||||
header = response.headers
|
header = response.headers
|
||||||
header['Access-Control-Allow-Origin'] = '*'
|
header["Access-Control-Allow-Origin"] = "*"
|
||||||
header["Access-Control-Allow-Methods"] = "GET,HEAD,OPTIONS,POST,PUT"
|
header["Access-Control-Allow-Methods"] = "GET,HEAD,OPTIONS,POST,PUT"
|
||||||
header["Access-Control-Allow-Headers"] = "Origin, X-Requested-With, Content-Type, Accept, Authorization"
|
header["Access-Control-Allow-Headers"] = "Origin, X-Requested-With, Content-Type, Accept, Authorization"
|
||||||
return response
|
return response
|
||||||
|
|
|
@ -11,7 +11,7 @@ def get_all():
|
||||||
return Role.query.all()
|
return Role.query.all()
|
||||||
|
|
||||||
|
|
||||||
def get(role_name):
|
def get(role_name) -> Role:
|
||||||
if type(role_name) is int:
|
if type(role_name) is int:
|
||||||
role = Role.query.get(role_name)
|
role = Role.query.get(role_name)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -39,7 +39,7 @@ class ModelSerializeMixin:
|
||||||
key, value = d.popitem()
|
key, value = d.popitem()
|
||||||
return value
|
return value
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return self.serialize().__str__()
|
return self.serialize().__str__()
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -57,7 +57,7 @@ setup(
|
||||||
"test": ["pytest", "coverage"],
|
"test": ["pytest", "coverage"],
|
||||||
},
|
},
|
||||||
entry_points={
|
entry_points={
|
||||||
"flaschengeist.plugin": [
|
"flaschengeist.plugins": [
|
||||||
# Authentication providers
|
# Authentication providers
|
||||||
"auth_plain = flaschengeist.plugins.auth_plain:AuthPlain",
|
"auth_plain = flaschengeist.plugins.auth_plain:AuthPlain",
|
||||||
"auth_ldap = flaschengeist.plugins.auth_ldap:AuthLDAP [ldap]",
|
"auth_ldap = flaschengeist.plugins.auth_ldap:AuthLDAP [ldap]",
|
||||||
|
|
Loading…
Reference in New Issue