aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/compat.py
diff options
context:
space:
mode:
authorTom Christie2015-01-30 14:00:25 +0000
committerTom Christie2015-01-30 14:00:25 +0000
commit4ee4b4f2dc3cffd8246772bdf829a2a720493377 (patch)
tree95b514483e901c10bdeee0d66e60430002d5101a /rest_framework/compat.py
parent8f33e39f62c59d06783dd3e6e7cf8d464ff08c5f (diff)
parent7cf9dea7f905ea6869148a68b4fa96cad0a347e8 (diff)
downloaddjango-rest-framework-4ee4b4f2dc3cffd8246772bdf829a2a720493377.tar.bz2
Merge master
Diffstat (limited to 'rest_framework/compat.py')
-rw-r--r--rest_framework/compat.py7
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: