Restore
This commit is contained in:
parent
1b111727be
commit
eac6cac7bc
@ -23,26 +23,26 @@ def create_app():
|
||||
app.config.from_object(Config())
|
||||
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto= 1, x_host= 1)
|
||||
|
||||
# bootstrap.init_app(app)
|
||||
# csrf.init_app(app)
|
||||
# db.init_app(app)
|
||||
# login_manager.init_app(app)
|
||||
# mail.init_app(app)
|
||||
bootstrap.init_app(app)
|
||||
csrf.init_app(app)
|
||||
db.init_app(app)
|
||||
login_manager.init_app(app)
|
||||
mail.init_app(app)
|
||||
|
||||
# login_manager.login_view = 'admin._login'
|
||||
# @login_manager.user_loader
|
||||
# def _load_user(user_id):
|
||||
# pass
|
||||
login_manager.login_view = 'admin._login'
|
||||
@login_manager.user_loader
|
||||
def _load_user(user_id):
|
||||
pass
|
||||
|
||||
# @app.errorhandler(404)
|
||||
# def _404_handler(error):
|
||||
# return jsonify({'error':'404 — Not Found'}), 404
|
||||
# @app.errorhandler(CSRFError)
|
||||
# def _csrf_handler():
|
||||
# return jsonify({'error':'Could not validate a secure connection.'}), 403
|
||||
# @app.context_processor
|
||||
# def _now():
|
||||
# return {'now': datetime.utcnow()}
|
||||
@app.errorhandler(404)
|
||||
def _404_handler(error):
|
||||
return jsonify({'error':'404 — Not Found'}), 404
|
||||
@app.errorhandler(CSRFError)
|
||||
def _csrf_handler():
|
||||
return jsonify({'error':'Could not validate a secure connection.'}), 403
|
||||
@app.context_processor
|
||||
def _now():
|
||||
return {'now': datetime.utcnow()}
|
||||
|
||||
app.register_blueprint(admin, url_prefix='/admin')
|
||||
app.register_blueprint(api, url_prefix='/api')
|
||||
|
Loading…
Reference in New Issue
Block a user