def main(global_conf, **settings): config = Configurator(settings=settings) config.include("pyramid_peewee") peewee_management = get_management() config.setup_from_config(peewee_management) peewee_management.populate() return config.make_wsgi_app()