Commit b4f5655c authored by Gary Wilson Jr's avatar Gary Wilson Jr
Browse files

Fixed #10553 -- Corrected several uses of `URLconf` in documentation and...

Fixed #10553 -- Corrected several uses of `URLconf` in documentation and comments, according to the Django style guide.  Based on patch from rduffield.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@10256 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 3a095073
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ def autodiscover():
    may want.
    """
    # Bail out if autodiscover didn't finish loading from a previous call so
    # that we avoid running autodiscover again when the URLConf is loaded by
    # that we avoid running autodiscover again when the URLconf is loaded by
    # the exception handler to resolve the handler500 view.  This prevents an
    # admin.py module with errors from re-registering models and raising a
    # spurious AlreadyRegistered exception (see #8245).
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ class NotRegistered(Exception):
class AdminSite(object):
    """
    An AdminSite object encapsulates an instance of the Django admin application, ready
    to be hooked in to your URLConf. Models are registered with the AdminSite using the
    to be hooked in to your URLconf. Models are registered with the AdminSite using the
    register() method, and the root() method can then be used as a Django view function
    that presents a full admin interface for the collection of registered models.
    """
+2 −2
Original line number Diff line number Diff line
@@ -47,8 +47,8 @@ class PasswordResetTest(TestCase):

    def test_confirm_invalid(self):
        url, path = self._test_confirm_start()
        # Lets munge the token in the path, but keep the same length,
        # in case the URL conf will reject a different length
        # Let's munge the token in the path, but keep the same length,
        # in case the URLconf will reject a different length.
        path = path[:-5] + ("0"*4) + path[-1]

        response = self.client.get(path)
+2 −4
Original line number Diff line number Diff line
"""

This is a urlconf to be loaded by tests.py. Add any urls needed
for tests only.

This is a URLconf to be loaded by tests.py. Add any URLs needed for tests only.
"""

from django.conf.urls.defaults import *
from django.contrib.formtools.tests import *

+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ except NameError:
    from django.utils.itercompat import reversed     # Python 2.3 fallback
    from sets import Set as set

_resolver_cache = {} # Maps urlconf modules to RegexURLResolver instances.
_resolver_cache = {} # Maps URLconf modules to RegexURLResolver instances.
_callable_cache = {} # Maps view and url pattern names to their view functions.

# SCRIPT_NAME prefixes for each thread are stored here. If there's no entry for
@@ -141,7 +141,7 @@ class RegexURLPattern(object):
class RegexURLResolver(object):
    def __init__(self, regex, urlconf_name, default_kwargs=None):
        # regex is a string representing a regular expression.
        # urlconf_name is a string representing the module containing urlconfs.
        # urlconf_name is a string representing the module containing URLconfs.
        self.regex = re.compile(regex, re.UNICODE)
        self.urlconf_name = urlconf_name
        if not isinstance(urlconf_name, basestring):
Loading