[Answered ]-ImportError from different apps

1👍

You are the victim of circular import dependency. In order to resolve this, you need to tell Django the import path of the model in ForeignKey instead of actually importing it:

class Notification(models.Model):
    user = models.ForeignKey('users.UserProfile')

Also don’t forget to delete import statement from from users.models import UserProfile from notifications/models.py.

1👍

You have circular dependencies loop.

User imports Notification and Notification imports User.

Just remove from notifications.models import Notification from your users/models.py

👤levi

Leave a comment