From a493c83248535c9fa7f78815b16bce7e88bf7966 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Wed, 19 Dec 2012 23:12:27 +0000 Subject: urls, patterns, include imports move to compat to support incoming 1.3 thru 1.6 import compatability --- rest_framework/compat.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rest_framework/compat.py') 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 -- cgit v1.2.3