def resources_preparing_factory(app, wrapper):
settings = app.app.registry.settings<EOL>config = settings.get(CONFIG_RESOURCES, None)<EOL>if not config:<EOL><INDENT>return<EOL><DEDENT>resources = [(k, [wrapper(r, GroupResource(k, v)) for r in v])<EOL>for k, v in config]<EOL>settings[CONFIG_RESOURCES] = resources<EOL>
Factory which wrap all resources in settings.