Ticket #12075: django-wsgiorg-routing_args.diff

File django-wsgiorg-routing_args.diff, 1.1 KB (added by Gustavo Narea, 14 years ago)

Improved patch to support wsgiorg.routing_args

  • django/core/handlers/base.py

     
    8181        try:
    8282            callback, callback_args, callback_kwargs = resolver.resolve(
    8383                    request.path_info)
     84           
     85            # WSGI routing arguments here.
     86            # This implementation is not complete because we would have to move
     87            # a part of PATH_INFO to SCRIPT_NAME, which would break backwards
     88            # compatibility. It's also incomplete because Django does not
     89            # support mixing positional and named arguments
     90            # (http://docs.djangoproject.com/en/dev/topics/http/urls/#the-matching-grouping-algorithm).
     91            # For more information about this standard, see
     92            # <http://wsgi.org/wsgi/Specifications/routing_args>.
     93            routing_args = (callback_args, callback_kwargs.copy())
     94            request.environ['wsgiorg.routing_args'] = routing_args
    8495
    8596            # Apply view middleware
    8697            for middleware_method in self._view_middleware:
Back to Top