示例#1
0
def dbcreate(t):
	from vuuvv.core import Application
	app = Application(__name__)
	with app.test_request_context():
		app.connect_database(reflect_all=True)
		__import__("db.schema")
示例#2
0
def runserver(t):
	from vuuvv.core import Application
	app = Application(__name__)
	app.run()
示例#3
0
文件: app.py 项目: vuuvv/vweb.old
def run(*args, **kw):
	app = Application(__name__)
	app.run(*args, **kw)
示例#4
0
文件: app.py 项目: vuuvv/vuuvv-test
#
#app = make_app()
#
#@app.before_first_request
#def init_database():
#	from flask import current_app as app, g
#	config = app.config
#	args = [config[name] for name in ('DRIVERNAME', 'USERNAME', 'PASSWORD', 'HOST', 'PORT', 'DATABASE')]
#	url = URL(*args)
#	g.db_engine = create_engine(str(url), echo = config['DEBUG'])
#	g.db_meta = MetaData()
#	g.db_session = scoped_session(sessionmaker(sutocommit=False, autoflush=False, bind=engine))
#
#@app.teardown_request
#def remove_db_session():
#	g.db_session.remove()
#
#@app.route("/")
#def hello():
#	print app.url_map
#	return "Hello! World!!"
#
#app.run()

import sys
sys.path.insert(0, "../..")

from vuuvv.core import Application
app = Application(__name__)
app.run()
示例#5
0
文件: run.py 项目: vuuvv/vuuvv-test
import sys

sys.path.insert(0, "../..")

from vuuvv.core import Application

app = Application(__name__)

with app.test_request_context():
    app.connect_database(reflect_all=True)
    __import__("db.schema")