Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added leading slash to output of core.urlresolvers.reverse(), and mad…

…e 'urlconf' a keyword argument

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 36ee8f5ad2f61bc8bf4e7d76d7569a762df15077 1 parent e3bb401
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/
4 django/core/
@@ -209,11 +209,11 @@ def resolve(path, urlconf=None):
resolver = RegexURLResolver(r'^/', urlconf)
return resolver.resolve(path)
-def reverse(viewname, urlconf, args=None, kwargs=None):
+def reverse(viewname, urlconf=None, args=None, kwargs=None):
args = args or []
kwargs = kwargs or {}
if urlconf is None:
from django.conf import settings
urlconf = settings.ROOT_URLCONF
resolver = RegexURLResolver(r'^/', urlconf)
- return resolver.reverse(viewname, *args, **kwargs)
+ return '/' + resolver.reverse(viewname, *args, **kwargs)
Please sign in to comment.
Something went wrong with that request. Please try again.