diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-04 11:21:41 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-04 11:21:41 -0700 |
commit | c4591cd12298cc03cd96af829a9a007d83d4e537 (patch) | |
tree | 1a5e47037bb2294a34841f0a7f7b04da3fccc369 /python/fatcat_web/__init__.py | |
parent | 005236655dec1cb3f7409724a711a19b52aa9108 (diff) | |
parent | edb9c1b85f367a50957dc0423c3104b900c7e92c (diff) | |
download | fatcat-c4591cd12298cc03cd96af829a9a007d83d4e537.tar.gz fatcat-c4591cd12298cc03cd96af829a9a007d83d4e537.zip |
Merge branch 'bnewbold-forms'
Diffstat (limited to 'python/fatcat_web/__init__.py')
-rw-r--r-- | python/fatcat_web/__init__.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/python/fatcat_web/__init__.py b/python/fatcat_web/__init__.py index e80393c2..3a332e84 100644 --- a/python/fatcat_web/__init__.py +++ b/python/fatcat_web/__init__.py @@ -1,8 +1,11 @@ from flask import Flask +from flask.logging import create_logger from flask_uuid import FlaskUUID from flask_debugtoolbar import DebugToolbarExtension from flask_login import LoginManager +from flask_wtf.csrf import CSRFProtect +from flask_misaka import Misaka from authlib.flask.client import OAuth from loginpass import create_flask_blueprint, Gitlab from raven.contrib.flask import Sentry @@ -10,11 +13,22 @@ import fatcat_client from fatcat_web.web_config import Config + toolbar = DebugToolbarExtension() app = Flask(__name__) app.config.from_object(Config) toolbar = DebugToolbarExtension(app) FlaskUUID(app) +app.csrf = CSRFProtect(app) +app.log = create_logger(app) + +# This is the Markdown processor; setting default here +Misaka(app, + autolink=True, + no_intra_emphasis=True, + strikethrough=True, + escape=True, +) login_manager = LoginManager() login_manager.init_app(app) @@ -46,7 +60,7 @@ else: print("No privileged token found") priv_api = None -from fatcat_web import routes, auth, cors +from fatcat_web import routes, editing_routes, auth, cors, forms gitlab_bp = create_flask_blueprint(Gitlab, oauth, auth.handle_oauth) app.register_blueprint(gitlab_bp, url_prefix='/auth/gitlab') |