2015-02-04 02:02:21 +01:00
|
|
|
from application import app
|
2015-03-10 11:38:57 +01:00
|
|
|
#from application import db
|
2015-02-04 02:02:21 +01:00
|
|
|
from flask.ext.script import Manager
|
|
|
|
# from flask.ext.migrate import Migrate
|
|
|
|
# from flask.ext.migrate import MigrateCommand
|
|
|
|
|
|
|
|
# migrate = Migrate(app, db)
|
|
|
|
manager = Manager(app)
|
|
|
|
# manager.add_command('db', MigrateCommand)
|
|
|
|
|
|
|
|
@manager.command
|
|
|
|
def create_all_tables():
|
2015-03-10 11:38:57 +01:00
|
|
|
pass
|
|
|
|
#db.create_all()
|
2015-02-04 02:02:21 +01:00
|
|
|
|
2015-04-01 10:10:26 -03:00
|
|
|
@manager.command
|
|
|
|
def runserver():
|
|
|
|
try:
|
2015-04-01 10:42:27 -03:00
|
|
|
import config
|
|
|
|
PORT = config.Development.PORT
|
|
|
|
HOST = config.Development.HOST
|
|
|
|
DEBUG = config.Development.DEBUG
|
2015-04-01 10:10:26 -03:00
|
|
|
except ImportError:
|
2015-04-01 10:42:27 -03:00
|
|
|
PORT = 4000
|
2015-04-01 10:10:26 -03:00
|
|
|
HOST = '0.0.0.0'
|
|
|
|
DEBUG = True
|
|
|
|
|
|
|
|
app.run(
|
|
|
|
port=PORT,
|
|
|
|
host=HOST,
|
|
|
|
debug=DEBUG)
|
|
|
|
|
2015-03-12 15:05:10 +01:00
|
|
|
if __name__ == '__main__':
|
|
|
|
manager.run()
|