summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Jean Louis <izimobil@gmail.com>2015-07-07 08:58:43 (GMT)
committerDavid Jean Louis <izimobil@gmail.com>2015-07-07 08:58:43 (GMT)
commit85694715392c0e30226123d76604a93cd84558e2 (patch)
treee0ab9b373fed6d81131aa4467c84cb1e3475d03c
parent97e5b92c83cb7993f0faad33c127b99b733650a8 (diff)
downloaddjango-admin-tools-85694715392c0e30226123d76604a93cd84558e2.zip
django-admin-tools-85694715392c0e30226123d76604a93cd84558e2.tar.gz
django-admin-tools-85694715392c0e30226123d76604a93cd84558e2.tar.bz2
Removed old backwards compatibility code (should close issue #3)
-rw-r--r--admin_tools/dashboard/dashboards.py6
-rw-r--r--admin_tools/dashboard/urls.py5
-rw-r--r--admin_tools/menu/urls.py5
-rw-r--r--admin_tools/urls.py5
4 files changed, 4 insertions, 17 deletions
diff --git a/admin_tools/dashboard/dashboards.py b/admin_tools/dashboard/dashboards.py
index 2c1a72d..d5242c8 100644
--- a/admin_tools/dashboard/dashboards.py
+++ b/admin_tools/dashboard/dashboards.py
@@ -11,11 +11,7 @@ except ImportError:
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from django.contrib.contenttypes.models import ContentType
-try:
- from django.utils.encoding import force_text
-except ImportError:
- # Django < 1.5
- from django.utils.encoding import force_unicode as force_text
+from django.utils.encoding import force_text
from admin_tools.dashboard import modules
from admin_tools.utils import get_admin_site_name, uniquify
diff --git a/admin_tools/dashboard/urls.py b/admin_tools/dashboard/urls.py
index 271539c..a7d285e 100644
--- a/admin_tools/dashboard/urls.py
+++ b/admin_tools/dashboard/urls.py
@@ -1,7 +1,4 @@
-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
urlpatterns = patterns('admin_tools.dashboard.views',
url(r'^set_preferences/(?P<dashboard_id>.+)/$', 'set_preferences', name='admin-tools-dashboard-set-preferences'),
diff --git a/admin_tools/menu/urls.py b/admin_tools/menu/urls.py
index 76ea4c3..e641244 100644
--- a/admin_tools/menu/urls.py
+++ b/admin_tools/menu/urls.py
@@ -1,7 +1,4 @@
-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
urlpatterns = patterns('admin_tools.menu.views',
url(r'^add_bookmark/$', 'add_bookmark', name='admin-tools-menu-add-bookmark'),
diff --git a/admin_tools/urls.py b/admin_tools/urls.py
index 5e2a273..fb1f49e 100644
--- a/admin_tools/urls.py
+++ b/admin_tools/urls.py
@@ -1,8 +1,5 @@
from django.conf import settings
-try:
- from django.conf.urls import patterns, url, include
-except ImportError: # django < 1.4
- from django.conf.urls.defaults import patterns, url, include
+from django.conf.urls import patterns, url, include
urls = []
if 'admin_tools.menu' in settings.INSTALLED_APPS: