Ticket #17132: leftover_defaults.diff

File leftover_defaults.diff, 815 bytes (added by Claude Paroz, 13 years ago)

Remove urls.defaults import

  • django/core/urlresolvers.py

    diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py
    index 709a1fe..a49f671 100644
    a b class RegexURLResolver(LocaleRegexProvider):  
    336336        callback = getattr(self.urlconf_module, 'handler%s' % view_type, None)
    337337        if not callback:
    338338            # No handler specified in file; use default
    339             # Lazy import, since urls.defaults imports this file
    340             from django.conf.urls import defaults
    341             callback = getattr(defaults, 'handler%s' % view_type)
     339            # Lazy import, since urls imports this file
     340            from django.conf import urls
     341            callback = getattr(urls, 'handler%s' % view_type)
    342342        return get_callable(callback), {}
    343343
    344344    def resolve403(self):
Back to Top