def main(): app = treestatus.app.wsgiapp({ 'here': os.curdir, 'sqlalchemy.url': 'sqlite:///treestatus.db', 'debug': True, }) model.DbBase.metadata.create_all() app.run()
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)