示例#1
0
def runserver(*args, **kwargs):
  """Override default `runserver` to init webapp before running."""
  app = init_webapp()
  # TODO(sholsapp): parameterize this, but don't clobber the *args, **kwargs
  # space, because it's annoying to have to pass these in to the `run` method.
  config = ConfigObj('config/sample.config', configspec='config/sample.configspec')
  app.config_obj = config
  app.run(*args, host='0.0.0.0', **kwargs)
示例#2
0
def runserver(*args, **kwargs):
    """Override default `runserver` to init webapp before running."""
    app = init_webapp()
    # TODO(sholsapp): parameterize this, but don't clobber the *args, **kwargs
    # space, because it's annoying to have to pass these in to the `run` method.
    config = ConfigObj('config/sample.config',
                       configspec='config/sample.configspec')
    app.config_obj = config
    app.run(*args, host='0.0.0.0', **kwargs)
示例#3
0
def dump_database():
  """Dump the flask-rrd database."""
  init_webapp()
  for r in RRD.query.all():
    print r
示例#4
0
def dump_database():
    """Dump the flask-rrd database."""
    init_webapp()
    for r in RRD.query.all():
        print r