# -*- coding: utf-8 -*- __author__ = 'SolPie' import sys import os from bae.core.const import * user, pw, host, port, db = MYSQL_USER, MYSQL_PASS, MYSQL_HOST, MYSQL_PORT, 'MVwslEoiYLtUAerKTSuE' uri = "mysql://%s:%s@%s:%s/%s" % ( user, pw, host, port, db) os.environ.setdefault('MYSQL', uri) print "This is BAE environ" sys.path.insert(0, os.path.join('pixtch', 'site-packages')) from flaskPixtch import create_app app = create_app() app.setup() from bae.core.wsgi import WSGIApplication application = WSGIApplication(app)
# This line sets up loggers basically. fileConfig(config.config_file_name) # add your model's MetaData object here # for 'autogenerate' support # from myapp import mymodel # target_metadata = mymodel.Base.metadata import os import sys sys.path.insert(0, os.path.realpath(".")) sys.path.insert(0, os.path.realpath("./pixtch")) from modules import db from flaskPixtch import create_app create_app(db, 'sqlite:///pixtch/db/test.db') target_metadata = db.metadata # other values from the config, defined by the needs of env.py, # can be acquired: # my_important_option = config.get_main_option("my_important_option") # ... etc. def run_migrations_offline(): """Run migrations in 'offline' mode. This configures the context with just a URL and not an Engine, though an Engine is acceptable here as well. By skipping the Engine creation we don't even need a DBAPI to be available.