Move the admin interface back to a blueprint
This commit is contained in:
@@ -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):
|
||||
|
||||
6
admin/mailu/ui/__init__.py
Normal file
6
admin/mailu/ui/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from flask import Blueprint
|
||||
|
||||
|
||||
ui = Blueprint('ui', __name__, static_folder='static', template_folder='templates')
|
||||
|
||||
from mailu.ui.views import *
|
||||
@@ -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
|
||||
|
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
Reference in New Issue
Block a user