Opened 16 years ago

Closed 12 years ago

#7032 closed Cleanup/optimization (needsinfo)

change django.core.handlers.base.get_response to use urlresolvers.resolve

Reported by: Travis Cline Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


django.core.handlers.base.get_response looks like it should use urlresolvers.resolve instead of directly instantiating urlresolvers.RegexURLResolver

Index: django/core/handlers/
--- django/core/handlers/        (revision 7425)
+++ django/core/handlers/        (working copy)
@@ -68,9 +68,8 @@
         # Get urlconf from request object, if available.  Otherwise use default.
         urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
-        resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
-            callback, callback_args, callback_kwargs = resolver.resolve(request.path)
+            callback, callback_args, callback_kwargs = urlresolvers.resolve(request.path, urlconf)
             # Apply view middleware
             for middleware_method in self._view_middleware:

Change History (7)

comment:1 by Eric Holscher, 16 years ago

milestone: 1.0
Triage Stage: UnreviewedDesign decision needed

comment:2 by Jacob, 16 years ago

Triage Stage: Design decision neededAccepted

comment:3 by Jacob, 16 years ago

Is there actually a bug here? Because "looks like it should ..." isn't a good enough reason to change verified working code.

comment:4 by Jacob, 16 years ago

Triage Stage: AcceptedDesign decision needed

comment:5 by Jacob, 16 years ago

milestone: 1.0

I don't see a bug here, so pushing post-1.0.

comment:6 by Luke Plant, 13 years ago

Severity: Normal
Type: Cleanup/optimization

comment:7 by Alex Gaynor, 12 years ago

Easy pickings: unset
Resolution: needsinfo
Status: newclosed
UI/UX: unset

I don't see a reason to do this, besides a desire for code churn ;). Closing needsinfo, feel free to reopen if there's a reason I missed.

Note: See TracTickets for help on using tickets.
Back to Top