Cannot import name 'FieldDoesNotExist' from 'django.db.models.fields'
Хочу сделать миграции, пишу python manage.py makemigrations
и получаю это
Полный Traceback выглядит так:
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 66, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 121, in get_package_libraries
module = import_module(entry[1])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/templatetags/rest_framework.py", line 12, in <module>
from rest_framework.renderers import HTMLFormRenderer
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/renderers.py", line 23, in <module>
from rest_framework import VERSION, exceptions, serializers, status
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/serializers.py", line 24, in <module>
from django.db.models.fields import FieldDoesNotExist
ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models.fields' (/Users/work/Library/Python/3.9/lib/python/site-packages/django/db/models/fields/__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/work/Projects/ims/api/manage.py", line 21, in <module>
main()
File "/Users/work/Projects/ims/api/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 393, in execute
self.check()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 419, in check
all_issues = checks.run_checks(
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/checks/registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/contrib/admin/checks.py", line 78, in check_dependencies
for engine in engines.all():
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 90, in all
return [self[alias] for alias in self]
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 90, in <listcomp>
return [self[alias] for alias in self]
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 81, in __getitem__
engine = engine_cls(params)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 25, in __init__
options['libraries'] = self.get_templatetag_libraries(libraries)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries
libraries = get_installed_libraries()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries
for name in get_package_libraries(pkg):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 123, in get_package_libraries
raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'rest_framework.templatetags.rest_framework': cannot import name 'FieldDoesNotExist' from 'django.db.models.fields' (/Users/work/Library/Python/3.9/lib/python/site-packages/django/db/models/fields/__init__.py)
MacBook-Air-Squidward:api work$ python3 manage.py makemigrations
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/apps/config.py", line 268, in get_model
return self.models[model_name.lower()]
KeyError: 'user'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/contrib/auth/__init__.py", line 160, in get_user_model
return django_apps.get_model(settings.AUTH_USER_MODEL, require_ready=False)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/apps/registry.py", line 211, in get_model
return app_config.get_model(model_name, require_ready=require_ready)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/apps/config.py", line 270, in get_model
raise LookupError(
LookupError: App 'companies' doesn't have a 'user' model.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/work/Projects/ims/api/manage.py", line 21, in <module>
main()
File "/Users/work/Projects/ims/api/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 395, in execute
django.setup()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/Users/work/Projects/ims/api/clients/models.py", line 11, in <module>
from loyalty.models import (
File "/Users/work/Projects/ims/api/loyalty/models.py", line 6, in <module>
from shops.models import Shop
File "/Users/work/Projects/ims/api/shops/models.py", line 9, in <module>
User = get_user_model()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/contrib/auth/__init__.py", line 164, in get_user_model
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'companies.user' that has not been installed
MacBook-Air-Squidward:api work$ python3 manage.py makemigrations
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 66, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 121, in get_package_libraries
module = import_module(entry[1])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/templatetags/rest_framework.py", line 12, in <module>
from rest_framework.renderers import HTMLFormRenderer
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/renderers.py", line 23, in <module>
from rest_framework import VERSION, exceptions, serializers, status
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/serializers.py", line 24, in <module>
from django.db.models.fields import FieldDoesNotExist
ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models.fields' (/Users/work/Library/Python/3.9/lib/python/site-packages/django/db/models/fields/__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/work/Projects/ims/api/manage.py", line 21, in <module>
main()
File "/Users/work/Projects/ims/api/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 393, in execute
self.check()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 419, in check
all_issues = checks.run_checks(
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/checks/registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/contrib/admin/checks.py", line 78, in check_dependencies
for engine in engines.all():
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 90, in all
return [self[alias] for alias in self]
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 90, in <listcomp>
return [self[alias] for alias in self]
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 81, in __getitem__
engine = engine_cls(params)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 25, in __init__
options['libraries'] = self.get_templatetag_libraries(libraries)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries
libraries = get_installed_libraries()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries
for name in get_package_libraries(pkg):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 123, in get_package_libraries
raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'rest_framework.templatetags.rest_framework': cannot import name 'FieldDoesNotExist' from 'django.db.models.fields' (/Users/work/Library/Python/3.9/lib/python/site-packages/django/db/models/fields/__init__.py)
MacBook-Air-Squidward:api work$ python3 manage.py makemigrations
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 66, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 121, in get_package_libraries
module = import_module(entry[1])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/templatetags/rest_framework.py", line 12, in <module>
from rest_framework.renderers import HTMLFormRenderer
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/renderers.py", line 23, in <module>
from rest_framework import VERSION, exceptions, serializers, status
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/serializers.py", line 24, in <module>
from django.db.models.fields import FieldDoesNotExist
ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models.fields' (/Users/work/Library/Python/3.9/lib/python/site-packages/django/db/models/fields/__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/work/Projects/ims/api/manage.py", line 21, in <module>
main()
File "/Users/work/Projects/ims/api/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 393, in execute
self.check()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 419, in check
all_issues = checks.run_checks(
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/checks/registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/contrib/admin/checks.py", line 78, in check_dependencies
for engine in engines.all():
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 90, in all
return [self[alias] for alias in self]
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 90, in <listcomp>
return [self[alias] for alias in self]
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 81, in __getitem__
engine = engine_cls(params)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 25, in __init__
options['libraries'] = self.get_templatetag_libraries(libraries)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries
libraries = get_installed_libraries()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries
for name in get_package_libraries(pkg):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 123, in get_package_libraries
raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'rest_framework.templatetags.rest_framework': cannot import name 'FieldDoesNotExist' from 'django.db.models.fields' (/Users/work/Library/Python/3.9/lib/python/site-packages/django/db/models/fields/__init__.py)
MacBook-Air-Squidward:api work$ python3 manage.py makemigrations
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 66, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 121, in get_package_libraries
module = import_module(entry[1])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/templatetags/rest_framework.py", line 12, in <module>
from rest_framework.renderers import HTMLFormRenderer
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/renderers.py", line 23, in <module>
from rest_framework import VERSION, exceptions, serializers, status
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/serializers.py", line 24, in <module>
from django.db.models.fields import FieldDoesNotExist
ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models.fields' (/Users/work/Library/Python/3.9/lib/python/site-packages/django/db/models/fields/__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/work/Projects/ims/api/manage.py", line 21, in <module>
main()
File "/Users/work/Projects/ims/api/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 393, in execute
self.check()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 419, in check
all_issues = checks.run_checks(
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/checks/registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/contrib/admin/checks.py", line 78, in check_dependencies
for engine in engines.all():
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 90, in all
return [self[alias] for alias in self]
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 90, in <listcomp>
return [self[alias] for alias in self]
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 81, in __getitem__
engine = engine_cls(params)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 25, in __init__
options['libraries'] = self.get_templatetag_libraries(libraries)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries
libraries = get_installed_libraries()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries
for name in get_package_libraries(pkg):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 123, in get_package_libraries
raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'rest_framework.templatetags.rest_framework': cannot import name 'FieldDoesNotExist' from 'django.db.models.fields' (/Users/work/Library/Python/3.9/lib/python/site-packages/django/db/models/fields/__init__.py)
MacBook-Air-Squidward:api work$ python3 manage.py makemigrations
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 66, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 121, in get_package_libraries
module = import_module(entry[1])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/templatetags/rest_framework.py", line 12, in <module>
from rest_framework.renderers import HTMLFormRenderer
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/renderers.py", line 23, in <module>
from rest_framework import VERSION, exceptions, serializers, status
File "/Users/work/Library/Python/3.9/lib/python/site-packages/rest_framework/serializers.py", line 24, in <module>
from django.db.models.fields import FieldDoesNotExist
ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models.fields' (/Users/work/Library/Python/3.9/lib/python/site-packages/django/db/models/fields/__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/work/Projects/ims/api/manage.py", line 21, in <module>
main()
File "/Users/work/Projects/ims/api/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 393, in execute
self.check()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 419, in check
all_issues = checks.run_checks(
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/core/checks/registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/contrib/admin/checks.py", line 78, in check_dependencies
for engine in engines.all():
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 90, in all
return [self[alias] for alias in self]
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 90, in <listcomp>
return [self[alias] for alias in self]
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/utils.py", line 81, in __getitem__
engine = engine_cls(params)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 25, in __init__
options['libraries'] = self.get_templatetag_libraries(libraries)
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries
libraries = get_installed_libraries()
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries
for name in get_package_libraries(pkg):
File "/Users/work/Library/Python/3.9/lib/python/site-packages/django/template/backends/django.py", line 123, in get_package_libraries
raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'rest_framework.templatetags.rest_framework': cannot import name 'FieldDoesNotExist' from 'django.db.models.fields' (/Users/work/Library/Python/3.9/lib/python/site-packages/django/db/models/fields/__init__.py)
файл init.py из верхнего пути очень большой и не смогу сюда вставить (не нашел в нем ничего про FieldDoesNotExist
)
в проекте используется django 2.2.6, не знаю какие файлы вам еще показать, пишите, я покажу
буду рад любой помощи