Beispiel #1
0
    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 = []
Beispiel #2
0
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)
Beispiel #3
0
def main():
    app = annotateit.create_app()

    with app.test_request_context():
        g.user = model.User.fetch('admin')
        embed(display_banner=False)
Beispiel #4
0
def setup():
    app = annotateit.create_app()
    try:
        annotateit.drop_all(app)
    except elasticsearch.exceptions.NotFoundError:
        pass
Beispiel #5
0
 def setup(self):
     self.app = annotateit.create_app()
     annotateit.create_all(self.app)
     self.ctx = self.app.test_request_context()
     self.ctx.push()
Beispiel #6
0
#!/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')
Beispiel #7
0
def setup():
    app = annotateit.create_app()
    try:
        annotateit.drop_all(app)
    except pyes.exceptions.ElasticSearchException:
        pass