예제 #1
0
def main():
    app = treestatus.app.wsgiapp({
        'here': os.curdir,
        'sqlalchemy.url': 'sqlite:///treestatus.db',
        'debug': True,
    })
    model.DbBase.metadata.create_all()
    app.run()
예제 #2
0
def main():
    app = treestatus.app.wsgiapp({
        'here': os.curdir,
        'sqlalchemy.url': 'sqlite:///treestatus.db',
        'debug': True,
    })
    model.DbBase.metadata.create_all()
    app.run()
예제 #3
0
def main():
    app = treestatus.app.wsgiapp({
        'here': os.curdir,
        'sqlalchemy.url': 'sqlite:///treestatus.db',
        'debug': True,
    })

    model.DbBase.metadata.create_all()

    # Create a sheriff user
    db = sqlite3.connect('/treestatus.db')
    try:
        db.execute('insert into users values(1, "*****@*****.**", 1, 1)')
        db.commit()
    except sqlite3.IntegrityError:
        # Hopefully this means our user already exists
        pass
    db.close()

    app.run(host='0.0.0.0', port=80)
예제 #4
0
def main():
    app = treestatus.app.wsgiapp({
        'here': os.curdir,
        'sqlalchemy.url': 'sqlite:///treestatus.db',
        'debug': True,
    })

    model.DbBase.metadata.create_all()

    # Create a sheriff user
    db = sqlite3.connect('/treestatus.db')
    try:
        db.execute('insert into users values(1, "*****@*****.**", 1, 1)')
        db.commit()
    except sqlite3.IntegrityError:
        # Hopefully this means our user already exists
        pass
    db.close()

    app.run(host='0.0.0.0', port=80)