Ejemplo n.º 1
0
def run_manage():
    CONF.register_cli_opt(
        cfg.SubCommandOpt('action',
                          help='command to run',
                          handler=add_cli_parsers))

    CONF(sys.argv[1:], project='rssboard')

    if CONF.debug:
        logging.basicConfig(level=logging.DEBUG)

    from cli import renew_feed

    if CONF.action.name == 'renew':
        with make_frontend_app().app_context():
            renew_feed()
Ejemplo n.º 2
0
def run_frontend():
    CONF(sys.argv[1:], project='rssboard')

    if CONF.debug:
        logging.basicConfig(level=logging.DEBUG)

    app = make_frontend_app()

    if CONF.debug:
        app.debug = CONF.debug
        app = DebuggedApplication(app, evalex=True)

    app = SharedDataMiddleware(app, {
        '/static': os.path.join(os.path.dirname(__file__), 'static')
        })

    run_simple('localhost', 8080, app, use_reloader=CONF.debug)