Пример #1
0
from __future__ import print_function

# import 3rd party libraries
from flask.ext.script import Manager
from flask.ext.assets import ManageAssets
from werkzeug.serving import run_simple, WSGIRequestHandler

# patch builtins to add INTERACT
import __builtin__
from utils.pyutils import interact
__builtin__.INTERACT = interact

# import settings and initialize app object
from config import settings
from backend.app import initialize_app
app = initialize_app(settings)

# import libraries
from utils.dbutils import reset_database, DatabaseControlError

# import our code after initialization of app
from config.log import setup_logging
from backend.models import db

setup_logging('scss')

manager = Manager(app)
manager.add_command('assets', ManageAssets())


@manager.command
Пример #2
0
from config import settings
from config.log import setup_logging
from backend.app import initialize_app
setup_logging()
application = initialize_app(settings)
Пример #3
0
from config import settings
from config.log import setup_logging
from backend.app import initialize_app

setup_logging()
application = initialize_app(settings)
Пример #4
0
from __future__ import print_function

# import 3rd party libraries
from flask.ext.script import Manager
from flask.ext.assets import ManageAssets
from werkzeug.serving import run_simple, WSGIRequestHandler

# patch builtins to add INTERACT
import __builtin__
from utils.pyutils import interact
__builtin__.INTERACT = interact

# import settings and initialize app object
from config import settings
from backend.app import initialize_app
app = initialize_app(settings)

# import libraries
from utils.dbutils import reset_database, DatabaseControlError

# import our code after initialization of app
from config.log import setup_logging
from backend.models import db

setup_logging('scss')

manager = Manager(app)
manager.add_command('assets', ManageAssets())

@manager.command
def runserver(port=5000, bindhost='127.0.0.1'):