Надо расширить стандартную модель User. Вот модель:
class Post(AbstractUser):
post = models.CharField(max_length=500)
user = models.ForeignKey(User)
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
user_pk = models.IntegerField(default=0)
user_send = models.IntegerField(default=0)
def __str__(self):
return str(self.created)
В settings.py написал AUTH_USER_MODEL = 'home.Post'
В админку зарегал admin.site.register(Post, UserAdmin)
Почему выдается ошибка ERRORS:
accounts.UserProfile.user: (fields.E301) Field defines a relation with the model 'auth.User', which has been swapped out.
HINT: Update the relation to point at 'settings.AUTH_USER_MODEL'.
home.Friend.current_user: (fields.E301) Field defines a relation with the model 'auth.User', which has been swapped out.
Что я делаю не так?