Example #1
0
 def create_app(self):
     """
     Method required by Flask-Testing to create the app object.
     """
     app = create_app()
     app.config['TESTING'] = True
     app.config['WTF_CSRF_ENABLED'] = False
     # Use an in-memory SQLite db.
     app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'
     return app
Example #2
0
 def create_app(self):
     """
     Method required by Flask-Testing to create the app object.
     """
     app = create_app()
     app.config['TESTING'] = True
     app.config['WTF_CSRF_ENABLED'] = False
     # Use a SQLite db. Migrations will not work on an in-memory db.
     app.config['SQLALCHEMY_DATABASE_URI'] = DB_PATH
     app.config['SQLALCHEMY_POOL_SIZE'] = None
     return app
Example #3
0
import argparse

from studygroup.application import create_app


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description='Runs a study group site.')
    parser.add_argument('--port', '-p', action='store', default=80, type=int)
    args = parser.parse_args()

    app = create_app(debug=True)
    app.run(debug=True, port=args.port)