This commit is contained in:
Vivek Santayana 2022-06-11 02:56:38 +01:00
parent 436c8e0e2d
commit fcfde34c72

View File

@ -23,26 +23,26 @@ def create_app():
app.config.from_object(Config()) app.config.from_object(Config())
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto= 1, x_host= 1) app.wsgi_app = ProxyFix(app.wsgi_app, x_proto= 1, x_host= 1)
# bootstrap.init_app(app) bootstrap.init_app(app)
# csrf.init_app(app) csrf.init_app(app)
# db.init_app(app) db.init_app(app)
# login_manager.init_app(app) login_manager.init_app(app)
# mail.init_app(app) mail.init_app(app)
# login_manager.login_view = 'admin._login' login_manager.login_view = 'admin._login'
# @login_manager.user_loader @login_manager.user_loader
# def _load_user(user_id): def _load_user(user_id):
# pass pass
# @app.errorhandler(404) @app.errorhandler(404)
# def _404_handler(error): def _404_handler(error):
# return jsonify({'error':'404 — Not Found'}), 404 return jsonify({'error':'404 — Not Found'}), 404
# @app.errorhandler(CSRFError) @app.errorhandler(CSRFError)
# def _csrf_handler(): def _csrf_handler():
# return jsonify({'error':'Could not validate a secure connection.'}), 403 return jsonify({'error':'Could not validate a secure connection.'}), 403
# @app.context_processor @app.context_processor
# def _now(): def _now():
# return {'now': datetime.utcnow()} return {'now': datetime.utcnow()}
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')