From 076ba7356d8a2ddc3fcb2af6159b29a877c1c867 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Wed, 6 Nov 2019 13:22:18 +0100
Subject: [PATCH] Move events to app package
---
app/__init__.py | 2 ++
app/{main => }/events.py | 6 +++---
app/main/__init__.py | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
rename app/{main => }/events.py (97%)
diff --git a/app/__init__.py b/app/__init__.py
index c08a4cf3..aa40c14b 100644
--- a/app/__init__.py
+++ b/app/__init__.py
@@ -23,6 +23,8 @@ def create_app(config_name):
mail.init_app(app)
socketio.init_app(app, message_qeue='redis://')
+ from . import events
+
from .admin import admin as admin_blueprint
app.register_blueprint(admin_blueprint, url_prefix='/admin')
diff --git a/app/main/events.py b/app/events.py
similarity index 97%
rename from app/main/events.py
rename to app/events.py
index c8ef6259..35474c64 100644
--- a/app/main/events.py
+++ b/app/events.py
@@ -1,8 +1,8 @@
from flask import current_app, request
from flask_login import current_user, login_required
-from ..decorators import admin_required
-from .. import db, socketio
-from ..models import User
+from .decorators import admin_required
+from . import db, socketio
+from .models import User
import json
import jsonpatch
import logging
diff --git a/app/main/__init__.py b/app/main/__init__.py
index 356af527..1baeacf6 100644
--- a/app/main/__init__.py
+++ b/app/main/__init__.py
@@ -3,7 +3,7 @@ from flask import Blueprint
main = Blueprint('main', __name__)
-from . import errors, events, views
+from . import errors, views
from ..models import Permission