def run():
  """The main method, starts the application running"""
  parser = create_arguments_parser() 
  arguments = parser.parse_args()
  if arguments.init_db:
    datastore.init_db(app)
  else:
    app.run(debug=arguments.debug, use_reloader=arguments.auto_reload)
Пример #2
0
from datastore import init_db

init_db()
Пример #3
0
 def run(self, host=None, port=None, debug=None, load_dotenv=True, **options):
     with self.app_context():
         init_db(IS_PRODUCTION)    
     super(FlaskApp, self).run(host=host, port=port, debug=debug, load_dotenv=load_dotenv, **options)
Пример #4
0
from datastore import init_db
init_db()