Skip to content

Updated django.conf.urls.default (deprecated since django 1.4) to django.conf.urls (django 1.6 no longer supports the old way) #394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debug_toolbar/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
try:
from django.conf.urls import patterns, url
except ImportError: # django < 1.4
from django.conf.urls.defaults import patterns, url
from django.conf.urls import patterns, url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong, the try and except clauses are identical.


_PREFIX = '__debug__'

Expand Down
2 changes: 1 addition & 1 deletion example/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.conf import settings
from django.conf.urls.defaults import *
from django.conf.urls import *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail with Django 1.4, which will still be supported in the next version.

from django.contrib import admin
from django.views.generic import TemplateView

Expand Down
2 changes: 1 addition & 1 deletion tests/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
try:
from django.conf.urls import patterns, url
except ImportError: # django < 1.4
from django.conf.urls.defaults import patterns, url
from django.conf.urls import patterns, url

admin.autodiscover()

Expand Down