diff options
Diffstat (limited to 'rest_framework/compat.py')
| -rw-r--r-- | rest_framework/compat.py | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/rest_framework/compat.py b/rest_framework/compat.py index a6620057..50f37014 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -63,6 +63,13 @@ except ImportError:      from django.http import HttpResponse as HttpResponseBase +# contrib.postgres only supported from 1.8 onwards. +try: +    from django.contrib.postgres import fields as postgres_fields +except ImportError: +    postgres_fields = None + +  # request only provides `resolver_match` from 1.5 onwards.  def get_resolver_match(request):      try: | 
