[Django]-Update the relation to point at settings.AUTH_USER_MODEL

5👍

The problem is that now you have got a CUSTOM USER and you are doing a ForeingKey to the Django User Model ( author = models.ForeignKey(User, related_name="courses")
) to get the new User you can do this at the beginning of any file where you will use User

from django.contrib.auth import get_user_model as user_model
User = user_model()

Leave a comment