Changed location of views to avoid circular import
This commit is contained in:
parent
4431564304
commit
767dcede54
@ -8,11 +8,6 @@ from werkzeug.middleware.proxy_fix import ProxyFix
|
|||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from app.admin.views import admin
|
|
||||||
from app.api.views import api
|
|
||||||
from app.views import views
|
|
||||||
from app.quiz.views import quiz
|
|
||||||
|
|
||||||
def create_app():
|
def create_app():
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config.from_object(Config())
|
app.config.from_object(Config())
|
||||||
@ -39,6 +34,11 @@ def create_app():
|
|||||||
def _now():
|
def _now():
|
||||||
return {'now': datetime.utcnow()}
|
return {'now': datetime.utcnow()}
|
||||||
|
|
||||||
|
from app.admin.views import admin
|
||||||
|
from app.api.views import api
|
||||||
|
from app.views import views
|
||||||
|
from app.quiz.views import quiz
|
||||||
|
|
||||||
app.register_blueprint(admin, url_prefix='/admin')
|
app.register_blueprint(admin, url_prefix='/admin')
|
||||||
app.register_blueprint(api, url_prefix='/api')
|
app.register_blueprint(api, url_prefix='/api')
|
||||||
app.register_blueprint(views)
|
app.register_blueprint(views)
|
||||||
|
Loading…
Reference in New Issue
Block a user