Commits

lemuelf committed 219bfbd

Fix more django.conf.urls.defaults DeprecationWarning; keep Django 1.3 compatibility.

If the modules doesn't exist in django.conf.urls module (Django 1.3), import it from
django.conf.urls.defaults; this keeps the app compatible with 1.3 (at least these
parts).

  • Participants
  • Parent commits 769464f
  • Branches django_1.5_urls_defaults_deprecation_fix

Comments (0)

Files changed (4)

File registration/auth_urls.py

 
 """
 
-from django.conf.urls.defaults import *
-
+try:
+    from django.conf.urls import patterns, url
+except ImportError:
+    from django.conf.urls.defaults import *
 from django.contrib.auth import views as auth_views
 
 

File registration/backends/default/urls.py

 
 """
 
-
-from django.conf.urls import *
+try:
+    from django.conf.urls import patterns, url, include
+except ImportError:
+    from django.conf.urls.defaults import *
 from django.views.generic import TemplateView
 
 from registration.views import activate

File registration/backends/simple/urls.py

 
 """
 
-
-from django.conf.urls import *
+try:
+    from django.conf.urls import patterns, url, include
+except ImportError:
+    from django.conf.urls.defaults import *
 from django.views.generic import TemplateView
 
 

File registration/tests/urls.py

 
 """
 
-from django.conf.urls.defaults import *
+try:
+    from django.conf.urls import patterns, url, include
+except ImportError:
+    from django.conf.urls.defaults import *
 from django.views.generic import TemplateView
 
 from registration.views import activate