Django cannot import name x [duplicate]

There is a circular import in your code, that’s why the Item can’t be imported in action.

You can solve the problem by removing the import of a class in one of your files, and replacing it with a string containing the name of the class, as explained in the documentation. For example :

effects = models.ManyToManyField('effects.Effect',through="ItemEffect",blank=True)

Leave a Comment