mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 06:46:16 +00:00
Flask-Common
This commit is contained in:
@@ -16,6 +16,7 @@ import uuid
|
||||
import argparse
|
||||
|
||||
from flask import Flask, Response, request, render_template, redirect, jsonify as flask_jsonify, make_response, url_for
|
||||
from flask_common import Common
|
||||
from six.moves import range as xrange
|
||||
from werkzeug.datastructures import WWWAuthenticate, MultiDict
|
||||
from werkzeug.http import http_date
|
||||
@@ -53,6 +54,9 @@ tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
|
||||
app = Flask(__name__, template_folder=tmpl_dir)
|
||||
app.debug = bool(os.environ.get('DEBUG'))
|
||||
|
||||
# Setup Flask-Common.
|
||||
common = Common(app)
|
||||
|
||||
# Send app errors to Sentry.
|
||||
if 'SENTRY_DSN' in os.environ:
|
||||
sentry = Sentry(app, dsn=os.environ['SENTRY_DSN'])
|
||||
|
||||
Reference in New Issue
Block a user