diff options
| author | Tom Christie | 2015-01-23 16:27:23 +0000 | 
|---|---|---|
| committer | Tom Christie | 2015-01-23 16:27:23 +0000 | 
| commit | 35f6a8246299d31ecce4f791f9527bf34cebe6e2 (patch) | |
| tree | e68af328d0e280d188e5de10b2feb1cf522fd961 /rest_framework/compat.py | |
| parent | 889a07f5563a0f970639a0958c0dcbc26e82919f (diff) | |
| download | django-rest-framework-35f6a8246299d31ecce4f791f9527bf34cebe6e2.tar.bz2 | |
Added DictField and support for HStoreField.
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 766afaec..36413394 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -58,6 +58,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: | 
