mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-29 21:13:44 +03:00
Remove unnecessary compat utility for Django < 1.11
This commit is contained in:
parent
d8bdda94df
commit
f8dff38e29
|
@ -5,13 +5,7 @@ class MissingType(object):
|
||||||
try:
|
try:
|
||||||
# Postgres fields are only available in Django with psycopg2 installed
|
# Postgres fields are only available in Django with psycopg2 installed
|
||||||
# and we cannot have psycopg2 on PyPy
|
# 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:
|
except ImportError:
|
||||||
ArrayField, HStoreField, JSONField, RangeField = (MissingType,) * 4
|
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
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user