Remove unnecessary compat utility for Django < 1.11

This commit is contained in:
Jay Hale 2018-08-16 14:27:30 -04:00
parent d8bdda94df
commit f8dff38e29

View File

@ -5,13 +5,7 @@ class MissingType(object):
try:
# Postgres fields are only available in Django with psycopg2 installed
# and we cannot have psycopg2 on PyPy
from django.contrib.postgres.fields import ArrayField, HStoreField, RangeField
from django.contrib.postgres.fields import (ArrayField, HStoreField,
JSONField, RangeField)
except ImportError:
ArrayField, HStoreField, JSONField, RangeField = (MissingType,) * 4
try:
# Postgres fields are only available in Django 1.9+
from django.contrib.postgres.fields import JSONField
except ImportError:
JSONField = MissingType