Ticket #10065: urlconfexception2.diff

File urlconfexception2.diff, 1.8 KB (added by Matthew Flanagan <mattimustang@…>, 16 years ago)

fix for typo in urlpattern exception with tests

  • django/core/urlresolvers.py

     
    206206        try:
    207207            iter(patterns)
    208208        except TypeError:
    209             raise ImproperlyConfigured("The included urlconf %s doesn't have any"
     209            raise ImproperlyConfigured("The included urlconf %s doesn't have any "
    210210                "patterns in it" % self.urlconf_name)
    211211        return patterns
    212212    url_patterns = property(_get_url_patterns)
  • tests/regressiontests/url_resolvers/no_urls.py

     
     1#from django.conf.urls.defaults import *
     2
  • tests/regressiontests/url_resolvers/tests.py

     
     1__test__ = {'API_TESTS': """
     2
     3RegexURLResolver should raise an exception when no urlpatterns exist.
     4
     5>>> from django.core.urlresolvers import RegexURLResolver
     6>>> no_urls = 'regressiontests.url_resolvers.no_urls'
     7>>> resolver = RegexURLResolver(r'^$', no_urls)
     8>>> resolver.url_patterns
     9Traceback (most recent call last):
     10...
     11ImproperlyConfigured: The included urlconf regressiontests.url_resolvers.no_urls doesn't have any patterns in it
     12"""}
Back to Top