In Django 3.1 FieldDoesNotExist is no longer available via django.db.models.fields
It has to be imported from the source file:
from django.core.exceptions import FieldDoesNotExist
This is the error I get:
from django_dynamic_fixture.django_helper import get_related_model, \
vi +12 .local/share/virtualenvs/tern-KsBtVxbD/lib/python3.7/site-packages/django_dynamic_fixture/django_helper.py #
from django.db.models.fields import NOT_PROVIDED, AutoField, FieldDoesNotExist
ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models.fields'
In Django 3.1 FieldDoesNotExist is no longer available via django.db.models.fields
It has to be imported from the source file:
from django.core.exceptions import FieldDoesNotExist
This is the error I get: from django_dynamic_fixture.django_helper import get_related_model, \ vi +12 .local/share/virtualenvs/tern-KsBtVxbD/lib/python3.7/site-packages/django_dynamic_fixture/django_helper.py #
from django.db.models.fields import NOT_PROVIDED, AutoField, FieldDoesNotExist
ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models.fields'