diff options
| author | Andrew Hankinson | 2012-12-30 14:03:08 -0400 |
|---|---|---|
| committer | Andrew Hankinson | 2012-12-30 14:03:08 -0400 |
| commit | c6f212238c238561749574a54aec3b1b1fd8df61 (patch) | |
| tree | 6c235aa1f61cdbcd834bccaa2c31c4c1bb32de0e /rest_framework/compat.py | |
| parent | df1880185c87733a82a41392898e67fe02c769aa (diff) | |
| parent | 33580c82b3487bdf00cbbaef409a4dd41e6750d5 (diff) | |
| download | django-rest-framework-c6f212238c238561749574a54aec3b1b1fd8df61.tar.bz2 | |
Merge branch 'master' of git://github.com/tomchristie/django-rest-framework into patch-support
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 5996b16e..5508f6c0 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 |
