annot-server/webapp/__init__.py
author ymh <ymh.work@gmail.com>
Tue, 14 Oct 2014 05:07:37 +0200
changeset 22 986ee928a866
child 23 16a1925df2df
permissions -rw-r--r--
add sqlalchemy model + put create module for webapp

#
# See LICENCE for detail
# Copyright (c) 2014 IRI
#

import uuid
import json

from flask import Flask

import config
import database

app = Flask(__name__)
app.secret_key = str(uuid.uuid4())
app.debug = config.DEBUG
app.config.from_object(config)

import webapp.views

@app.teardown_appcontext
def shutdown_session(exception=None):
    database.db_session.remove()