# Path: app.py



import os
import sys
import config
from tornado.database import Connection
from flask import g, render_template
from app import app
# -*- coding: utf-8 -*-
"""
    database.use_tornado_database
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Using tornado.database with MySQL
    http://flask.pocoo.org/snippets/11/
"""

sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))





# Path: app.py



# Path: database/use_tornado_database.py
import os
import sys
import config
from tornado.database import Connection
from flask import g, render_template
from app import app

# -*- coding: utf-8 -*-
"""
    database.use_tornado_database
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Using tornado.database with MySQL
    http://flask.pocoo.org/snippets/11/
"""

sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))





@app.before_request