import sys reload(sys) sys.setdefaultencoding('utf8') app = flask.Flask(__name__) app.config.from_object(config) app.jinja_env.line_statement_prefix = '#' app.jinja_env.line_comment_prefix = '##' app.jinja_env.globals.update( check_form_fields=util.check_form_fields, is_iterable=util.is_iterable, slugify=util.slugify, update_query_argument=util.update_query_argument, ) import auth import control import model import task import control.track import control.artist from api import helpers api = helpers.Api(app) import api.v1 if config.DEVELOPMENT: from werkzeug import debug app.wsgi_app = debug.DebuggedApplication(app.wsgi_app, evalex=True) app.testing = False
app.jinja_env.line_comment_prefix = '##' app.jinja_env.globals.update( check_form_fields=util.check_form_fields, is_iterable=util.is_iterable, slugify=util.slugify, update_query_argument=util.update_query_argument, ) import auth import control import model import task from api import helpers api_v1 = helpers.Api(app, prefix='/api/v1') import api.v1 if config.DEVELOPMENT: from werkzeug import debug try: app.wsgi_app = debug.DebuggedApplication( app.wsgi_app, evalex=True, pin_security=False, ) except TypeError: app.wsgi_app = debug.DebuggedApplication(app.wsgi_app, evalex=True) app.testing = False
# coding: utf-8 """ Initializes flask server and assigns all routes by importing modules """ import flask import config app = flask.Flask(__name__) # pylint: disable=invalid-name # note, while developing Flask server doesn't need to run with DEBUG parameter, since server restarting # is taken care by GAE SDK app.config.from_object(config) app.jinja_env.line_statement_prefix = '#' app.jinja_env.line_comment_prefix = '##' import auth # pylint: disable=unused-import import control # pylint: disable=unused-import import model # pylint: disable=unused-import import task # pylint: disable=unused-import from api import helpers API = helpers.Api(app) import api.v1 # pylint: disable=unused-import