diff --git a/backend/flaschengeist_events/__init__.py b/backend/flaschengeist_events/__init__.py index c32e388..ff707d2 100644 --- a/backend/flaschengeist_events/__init__.py +++ b/backend/flaschengeist_events/__init__.py @@ -2,6 +2,7 @@ Provides duty schedule / duty roster functions """ +import pkg_resources from flask import Blueprint, current_app from werkzeug.local import LocalProxy @@ -9,12 +10,15 @@ from flaschengeist.plugins import Plugin from . import permissions, models +__version__ = pkg_resources.get_distribution("flaschengeist_events").version + + class EventPlugin(Plugin): - name = "events" - id = "dev.flaschengeist.plugins.events" - plugin = LocalProxy(lambda: current_app.config["FG_PLUGINS"][EventPlugin.name]) + id = "dev.flaschengeist.events" + plugin = LocalProxy(lambda: current_app.config["FG_PLUGINS"][EventPlugin.id]) + # provided resources permissions = permissions.permissions - blueprint = Blueprint(name, __name__) + blueprint = Blueprint("events", __name__) models = models def __init__(self, cfg):