Add support for Django 3.1

In Django 3.1 the compatibility import of django.core.exceptions.FieldDoesNotExist in django.db.models.fields is removed.

So we'd have to update the package by replacing:
from django.db.models.fields import FieldDoesNotExist
with
from django.core.exceptions import FieldDoesNotExist
This commit is contained in:
gantonayde 2020-08-11 23:16:58 +01:00 committed by GitHub
parent ec89796299
commit 833789891b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,8 @@
"""
These functions handle the adding of fields to other models
"""
from django.db.models import FieldDoesNotExist, ForeignKey, ManyToManyField, CASCADE
from django.db.models import ForeignKey, ManyToManyField, CASCADE
from django.core.exceptions import FieldDoesNotExist
from . import fields
# from settings import self._field_registry, self._model_registry
from django.utils.translation import ugettext_lazy as _