question:
When running Django, an exception occurred, and the console output exception is:
ImportError: cannot import name 'ProjectModelSerializer' from partially initialized module 'projects.serializers' (most likely due to a circular import) (/Users/。。/。。/。。/projects/serializers.py)
solve:
Reason: It turned out that there were mutual references in two files.
In the projects.serializers.py file:
from interfaces.serializers import InterfaceModelSerializer
In the interfaces.serializers.py file:
from projects.serializers import ProjectModelSerializer
When I commented out one of the references, things went back to normal