Exemplo n.º 1
0
def createdb():
    """init mysql tables"""
    init_app()
    try:
        APP_DB.create_all()
    except:
        pass
    u = User("manager", "*****@*****.**", "123456", "0")
    u.confirmed = True
    APP_DB.session.add(u)
    APP_DB.session.commit()
Exemplo n.º 2
0
def web_start():
    init_app()
    run_application()
Exemplo n.º 3
0
 def setUp(self):
     self.db_fd, webapp.app.config['DATABASE'] = tempfile.mkstemp()
     webapp.app.config['TESTING'] = True
     self.app = webapp.app.test_client()
     webapp.init_app()
Exemplo n.º 4
0
from webapp import init_app

app = init_app()

if __name__ == "__main__":
    app.run(debug=True)
Exemplo n.º 5
0
#!/usr/bin/python
from webapp import app, init_app

app.config["DATABASE"] = "./database.db"
init_app()
app.run(host="0.0.0.0", port=80, debug=True)