django.conf.urls.defaults has been removed in Django 1.6

Bug #1252866 reported by Andrew Starr-Bochicchio
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
django-openid-auth
Fix Committed
Undecided
Unassigned
python-django-openid-auth (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Just got around to actually trying my app with Django 1.6 not just running the django-openid-auth testsuite. There seems to be another compatability issue. django.conf.urls.defaults was deprecated in Django 1.4 has been removed in Django 1.6:

See: https://docs.djangoproject.com/en/dev/internals/deprecation/#id3

django.conf.urls.defaults will be removed. The functions include(), patterns() and url() plus handler404, handler500, are now available through django.conf.urls .

Looks like it just needs a simple:

-from django.conf.urls.defaults import *
+from django.conf.urls import *

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/

Django Version: 1.6
Python Version: 2.7.5
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_openid_auth',
 'django.contrib.admin',
 'django.contrib.comments',
 'uploads')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  101. resolver_match = resolver.resolve(request.path_info)
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py" in resolve
  318. for pattern in self.url_patterns:
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py" in url_patterns
  346. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py" in urlconf_module
  341. self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module
  40. __import__(name)
File "/home/asb/Desktop/trunk/overview/urls.py" in <module>
  19. url(r'^openid/', include('django_openid_auth.urls')),
File "/usr/lib/python2.7/dist-packages/django/conf/urls/__init__.py" in include
  26. urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module
  40. __import__(name)
File "/usr/lib/pymodules/python2.7/django_openid_auth/urls.py" in <module>
  30. from django.conf.urls.defaults import *

Exception Type: ImportError at /
Exception Value: No module named defaults

Related branches

Changed in python-django-openid-auth (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Jackson Doak (noskcaj) wrote :

Fixed in the new source package

Changed in python-django-openid-auth (Ubuntu):
status: Triaged → Fix Released
Changed in django-openid-auth:
status: New → Fix Released
Changed in django-openid-auth:
status: Fix Released → Confirmed
Changed in django-openid-auth:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.