daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # This must be contained in a function so we can call it with Zappa
  2. def db_init():
  3.     from project import create_app, db
  4.  
  5.     app = create_app()
  6.     app.app_context().push()
  7.  
  8.     from project.models.model1 import Model1
  9.  
  10.     # if you have more models just add them here
  11.     # from project.models.model2 import Model2
  12.     # from project.models.lots_of_models import Model3, Model4, Model5
  13.  
  14.     db.create_all()
  15.  
  16.  
  17. if __name__ == "__main__":
  18.     db_init()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top