[Django]-ImportError: No module named models?

8👍

Because it thinks that you’re referring to the groups.py in the same directory. Enable absolute imports.

3👍

I hade the same problem. The solution was as simple as

from __future__ import absolute_import

hinted by Ignacio

👤webjay

0👍

Just a guess, but does your models.py file import groups or decorators? If so, you have a circular dependency. You’ll need to move the imports in one of the files into the function level.

Leave a comment