Guest User

Untitled

a guest
Jul 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. from flaskext.script import Manager
  2.  
  3. from app import app
  4. import fixtures as _fixtures
  5. import models
  6.  
  7.  
  8. manager = Manager(app)
  9.  
  10.  
  11. @manager.command
  12. def tables():
  13. "Create database tables."
  14. models.create_tables(app)
  15.  
  16.  
  17. @manager.command
  18. def fixtures():
  19. "Install test data fixtures into the configured database."
  20. _fixtures.install(app, *_fixtures.all_data)
  21.  
  22.  
  23. if __name__ == "__main__":
  24. manager.run()
Add Comment
Please, Sign In to add comment