Move the admin interface back to a blueprint

This commit is contained in:
kaiyou
2017-09-24 12:00:39 +02:00
parent 914427f852
commit 974c351802
115 changed files with 75 additions and 63 deletions

View File

@@ -13,7 +13,7 @@ from apscheduler.schedulers import background
# Create application
app = flask.Flask(__name__, static_url_path='/admin/app_static')
app = flask.Flask(__name__)
default_config = {
'SQLALCHEMY_DATABASE_URI': 'sqlite:////data/main.db',
@@ -82,7 +82,8 @@ def inject_user():
return dict(current_user=flask_login.current_user)
# Import views
from mailu.views import *
from mailu import ui
app.register_blueprint(ui.ui, url_prefix='/ui')
# Create the prefix middleware
class PrefixMiddleware(object):

View File

@@ -0,0 +1,6 @@
from flask import Blueprint
ui = Blueprint('ui', __name__, static_folder='static', template_folder='templates')
from mailu.ui.views import *

View File

@@ -1,4 +1,5 @@
from mailu import db, models, forms
from mailu import db, models
from mailu.ui import forms
import flask
import flask_login

View File

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Some files were not shown because too many files have changed in this diff Show More