diff options
| author | Michal Dvorak (cen38289) | 2012-12-21 10:53:23 +0100 |
|---|---|---|
| committer | Michal Dvorak (cen38289) | 2012-12-21 10:53:23 +0100 |
| commit | 5ba2437f2dcb4eb7f9677ff9e393c27af38b071f (patch) | |
| tree | df19512bc58ae3180813c9d479267b7a617e9b8e /rest_framework/compat.py | |
| parent | 8ac77eaae8d6ad01ec8f6de18134c4aa1961d4dd (diff) | |
| parent | 79aea2f0d082f17e7bb75cc32bd71b5f04836d43 (diff) | |
| download | django-rest-framework-5ba2437f2dcb4eb7f9677ff9e393c27af38b071f.tar.bz2 | |
Merge remote-tracking branch 'tom/master'
Conflicts:
rest_framework/tests/serializer.py
Diffstat (limited to 'rest_framework/compat.py')
| -rw-r--r-- | rest_framework/compat.py | 6 |
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 |
