mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-26 03:24:07 +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:
|
||||
# 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
|
||||
|
|
Loading…
Reference in New Issue
Block a user