diff options
| author | Tom Christie | 2012-02-21 20:57:36 +0000 |
|---|---|---|
| committer | Tom Christie | 2012-02-21 20:57:36 +0000 |
| commit | 5fd4c639d7c64572dd07dc31dcd627bed9469b05 (patch) | |
| tree | d7cf3ba46e76937176f81e1ebc334bc790e7026c /djangorestframework/compat.py | |
| parent | af9e4f69d732cc643d6ec7ae13d4a19ac0332d44 (diff) | |
| download | django-rest-framework-5fd4c639d7c64572dd07dc31dcd627bed9469b05.tar.bz2 | |
Merge master into develop
Diffstat (limited to 'djangorestframework/compat.py')
| -rw-r--r-- | djangorestframework/compat.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/djangorestframework/compat.py b/djangorestframework/compat.py index 7690316c..b818b446 100644 --- a/djangorestframework/compat.py +++ b/djangorestframework/compat.py @@ -457,3 +457,11 @@ except ImportError: # python < 2.7 return decorator unittest.skip = skip + +# reverse_lazy (Django 1.4 onwards) +try: + from django.core.urlresolvers import reverse_lazy +except: + from django.core.urlresolvers import reverse + from django.utils.functional import lazy + reverse_lazy = lazy(reverse, str) |
