diff options
| author | Sébastien Piquemal | 2012-02-23 09:01:33 +0200 |
|---|---|---|
| committer | Sébastien Piquemal | 2012-02-23 09:01:33 +0200 |
| commit | 9da1ae81dc9a056db94ea07f35478ed003fea598 (patch) | |
| tree | 2557ce0fe8be2b7febb184c3bb3da7b5289fbbe1 /djangorestframework/compat.py | |
| parent | 242327d339fe1193a45c64cb20a2ba4c56044c3b (diff) | |
| parent | 5fd4c639d7c64572dd07dc31dcd627bed9469b05 (diff) | |
| download | django-rest-framework-9da1ae81dc9a056db94ea07f35478ed003fea598.tar.bz2 | |
merged + fixed broken test
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) |
