|
|
@ -1,12 +1,12 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
from flask import Flask |
|
|
|
from flask import Flask |
|
|
|
from flask.ext.assets import Environment |
|
|
|
from flask.ext.assets import Environment |
|
|
|
|
|
|
|
from flask_debugtoolbar import DebugToolbarExtension |
|
|
|
from webassets.loaders import PythonLoader |
|
|
|
from webassets.loaders import PythonLoader |
|
|
|
|
|
|
|
|
|
|
|
from {{cookiecutter.repo_name}}.settings import ProdConfig |
|
|
|
from {{cookiecutter.repo_name}}.settings import ProdConfig |
|
|
|
from {{cookiecutter.repo_name}}.assets import assets |
|
|
|
from {{cookiecutter.repo_name}}.assets import assets |
|
|
|
from {{cookiecutter.repo_name}}.extensions import login_manager |
|
|
|
from {{cookiecutter.repo_name}}.extensions import db, login_manager |
|
|
|
from {{cookiecutter.repo_name}}.database import db |
|
|
|
|
|
|
|
from {{cookiecutter.repo_name}} import public, user |
|
|
|
from {{cookiecutter.repo_name}} import public, user |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -27,11 +27,11 @@ def register_extensions(app): |
|
|
|
db.init_app(app) |
|
|
|
db.init_app(app) |
|
|
|
login_manager.init_app(app) |
|
|
|
login_manager.init_app(app) |
|
|
|
assets.init_app(app) |
|
|
|
assets.init_app(app) |
|
|
|
|
|
|
|
toolbar = DebugToolbarExtension(app) |
|
|
|
return None |
|
|
|
return None |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def register_blueprints(app): |
|
|
|
def register_blueprints(app): |
|
|
|
# Register blueprints |
|
|
|
|
|
|
|
app.register_blueprint(public.views.blueprint) |
|
|
|
app.register_blueprint(public.views.blueprint) |
|
|
|
app.register_blueprint(user.views.blueprint) |
|
|
|
app.register_blueprint(user.views.blueprint) |
|
|
|
return None |
|
|
|
return None |
|
|
|