def __init__(self): # Make app and database connection self.app = annotateit.create_app() self.app.test_request_context().push() self.annotations = [] self.accounts = [] self.discarded_accounts = []
import os import annotateit if __name__ == '__main__': port = int(os.environ.get('PORT', 5000)) host = os.environ.get('HOST', '0.0.0.0') app = annotateit.create_app() app.run(port=port, host=host, use_reloader=False)
def main(): app = annotateit.create_app() with app.test_request_context(): g.user = model.User.fetch('admin') embed(display_banner=False)
def setup(): app = annotateit.create_app() try: annotateit.drop_all(app) except elasticsearch.exceptions.NotFoundError: pass
def setup(self): self.app = annotateit.create_app() annotateit.create_all(self.app) self.ctx = self.app.test_request_context() self.ctx.push()
#!/usr/bin/env python from migrate.versioning.shell import main if __name__ == '__main__': import annotateit app = annotateit.create_app() main(url=app.config['SQLALCHEMY_DATABASE_URI'], debug='False', repository='migration')
def setup(): app = annotateit.create_app() try: annotateit.drop_all(app) except pyes.exceptions.ElasticSearchException: pass