auth_user error with Django 1.8 and syncdb / migrate

前端 未结 8 951
独厮守ぢ
独厮守ぢ 2021-01-31 14:03

When upgrading to Django 1.8 (with zc.buildout) and running syncdb or migrate, I get this message:

django.db.utils.ProgrammingError: relation \"auth_user\" does no

8条回答
  •  面向向阳花
    2021-01-31 14:47

    Try referring to the User using this

    from django.conf import settings
    user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='%(app_label)s_%(class)s_user', blank=True, null=True, editable=False)
    

提交回复
热议问题