Experimental radio CMS based on Flask (Python) micro-framework for Radio Rhino (Strasbourg).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

manage.py 787B

123456789101112131415161718192021222324
  1. import os
  2. from app import create_app, db
  3. from flask_script import Manager, Shell
  4. from flask_migrate import Migrate, MigrateCommand
  5. from flask_alchemydumps import AlchemyDumps, AlchemyDumpsCommand
  6. from app.commands import *
  7. app = create_app(os.getenv('FLASK_CONFIG') or 'development')
  8. manager = Manager(app)
  9. alchemydumps = AlchemyDumps(app,db)
  10. def make_shell_context():
  11. return dict(app=app, db=db)
  12. migrate = Migrate(app, db)
  13. manager.add_command('alchemydumps', AlchemyDumpsCommand)
  14. manager.add_command('db', MigrateCommand)
  15. manager.add_command('shell', Shell(make_context=make_shell_context))
  16. manager.add_command('nuke', NukeCommand(db))
  17. manager.add_command('lorem', LoremCommand(db))
  18. manager.add_command('routes', RoutesCommand(app))
  19. if __name__ == '__main__':
  20. manager.run()