Reputation: 4391
I have a django project with few apps. The project is running successfully without any error. Now I am writing test cases for some of the apps in the project.
I ran the test using following command
python manage.py test apps.UserProfile
Upvotes: 4
Views: 633
Reputation: 5739
You have a circular import. Your stack trace shows Student depends on Student through a bunch of other modules.
Usually you can solve this by changing your import statement to not have a "from"
Eg import apps.x.y.z
This form of import doesn't actually execute the imported module when it hits that statement, so it doesn't get stuck in a circular import loop.
Upvotes: 4