diff options
| author | Tom Christie | 2015-01-23 16:33:37 +0000 |
|---|---|---|
| committer | Tom Christie | 2015-01-23 16:33:37 +0000 |
| commit | 8f6d7f4a5a34a144700d943cb8fcf496d0d3734a (patch) | |
| tree | 10d78980e5511e1aa41175b8a11fc2b97e26f429 /rest_framework/compat.py | |
| parent | b07d931261c2e9f722fb2de63ab17f088142b6f1 (diff) | |
| parent | 35f6a8246299d31ecce4f791f9527bf34cebe6e2 (diff) | |
| download | django-rest-framework-8f6d7f4a5a34a144700d943cb8fcf496d0d3734a.tar.bz2 | |
Merge pull request #2451 from tomchristie/dict-field
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: |
