예제 #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 = []
예제 #2
0
파일: run.py 프로젝트: scharf/annotateit
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)
예제 #3
0
def main():
    app = annotateit.create_app()

    with app.test_request_context():
        g.user = model.User.fetch('admin')
        embed(display_banner=False)
예제 #4
0
def setup():
    app = annotateit.create_app()
    try:
        annotateit.drop_all(app)
    except elasticsearch.exceptions.NotFoundError:
        pass
예제 #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()
예제 #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')
예제 #7
0
def setup():
    app = annotateit.create_app()
    try:
        annotateit.drop_all(app)
    except pyes.exceptions.ElasticSearchException:
        pass