aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/compat.py')
-rw-r--r--rest_framework/compat.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index d4901437..86952fb8 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -5,6 +5,12 @@ versions of django/python, and compatibility wrappers around optional packages.
# flake8: noqa
import django
+# location of patterns, url, include changes in 1.4 onwards
+try:
+ from django.conf.urls import patterns, url, include
+except:
+ from django.conf.urls.defaults import patterns, url, include
+
# django-filter is optional
try:
import django_filters