AUTH_USER_MODEL refers to model 'accounts.User' that has not been installed

前端 未结 5 1841
渐次进展
渐次进展 2021-01-05 09:42

I\'m using a custom user model, extended with AbstractUser. Here\'s my models.py:

    # -*- coding: utf-8 -*-
from __future__ import unicode_literals

from d         


        
5条回答
  •  生来不讨喜
    2021-01-05 10:28

    it's an import issue: try changing the order of the imports: try: from django.contrib.auth.models import AbstractUser then: from django.db import models

提交回复
热议问题