diff --git a/oml/app.py b/oml/app.py index 73aaba2..72703f5 100644 --- a/oml/app.py +++ b/oml/app.py @@ -3,7 +3,7 @@ from __future__ import division from flask import Flask -from flask.ext.script import Manager +from flask.ext.script import Manager, Shell from flask.ext.migrate import Migrate, MigrateCommand import logging @@ -38,11 +38,15 @@ db.init_app(app) migrate = Migrate(app, db) -manager = Manager(app) +manager = Manager(app, with_default_commands=False) manager.add_command('db', MigrateCommand) -manager.add_command('setup', commands.Setup) -manager.add_command('update_static', commands.UpdateStatic) manager.add_command('release', commands.Release) +manager.add_command('debug', commands.Debug) +#manager.add_command('start', commands.Start) +#manager.add_command('stop', commands.Stop) +manager.add_command('setup', commands.Setup) +manager.add_command('shell', Shell) +manager.add_command('update_static', commands.UpdateStatic) @app.route('/') @app.route('/') diff --git a/oml/commands.py b/oml/commands.py index fcd94a8..0199369 100644 --- a/oml/commands.py +++ b/oml/commands.py @@ -11,6 +11,26 @@ def r(*cmd): print ' '.join(cmd) return subprocess.call(cmd) +class Debug(Command): + """ + Start Open Media Library in debug mode + """ + def run(self): + pass + +class Start(Command): + """ + Start Open Media Libary + """ + def run(self): + pass + +class Stop(Command): + """ + Stop Open Media Libary + """ + def run(self): + pass class Setup(Command): """ @@ -26,7 +46,7 @@ class Setup(Command): class UpdateStatic(Command): """ - setup new node + update static files """ def run(self): import settings