def main(global_config, **settings): """ This function returns a Pyramid WSGI application. run with: bin/pserve pyramid.ini --reload """ config = Configurator(settings=settings) do_static_config(config) views.do_view_config(config) config.scan() return config.make_wsgi_app()
def cmdline(): ''' as an alternate to pserve, you can run this via bin/python ott/view/pyramid_app it should start the server on http://127.0.0.1:8080 ''' # configuration settings here = os.path.dirname(os.path.abspath(__file__)) mako_dir = os.path.join(here, 'templates') log.info(here + " " + mako_dir) # make the mako views settings = {} settings['mako.directories'] = mako_dir config = make_config(settings) views.do_view_config(config) # serve app app = config.make_wsgi_app() server = make_server('0.0.0.0', 8080, app) server.serve_forever() get_settings()
def cmdline(): ''' as an alternate to pserve, you can run this via bin/python ott/view/pyramid_app it should start the server on http://127.0.0.1:8080 ''' # configuration settings here = os.path.dirname(os.path.abspath(__file__)) mako_dir = os.path.join(here, 'templates') log.info(here + " " + mako_dir) # make the mako views settings={} settings['mako.directories'] = mako_dir config=make_config(settings) views.do_view_config(config) # serve app app = config.make_wsgi_app() server = make_server('0.0.0.0', 8080, app) server.serve_forever() get_settings()