import plaster
from pyramid.request import Request, apply_request_extensions
def make_request():
loader = plaster.get_loader('development.ini', protocols=['wsgi'])
app = loader.get_wsgi_app()
r = Request.blank('/localhost:6543')
r.registry = app.registry
apply_request_extensions(r)
return rdef copy_request(request):"""Create clone of given request, keeping registry and root as well"""root = request.rootrequest = request.copy()if not hasattr(request, 'registry'):registry = get_current_registry()if registry is None:registry = get_global_registry()request.registry = registryrequest.root = rootreturn request
--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/feac8d1c-4f07-46a6-af06-dc94eb1b2d69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.