【问题标题】:error in AUTH_USER_MODEL after upgrading Django升级 Django 后 AUTH_USER_MODEL 出错
【发布时间】:2019-07-08 16:14:21
【问题描述】:

我正在开发 django 1.8 和 python 2.7 然后我将我的 django 升级到 2.2 和 python 到 3.6 但是当我运行时

python manage.py runserver

我在显示我的终端中遇到错误:

django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'users.User' that has not been installed

我在setting.py 中使用AUTH_USER_MODEL = 'users.User'

我没有对代码进行任何更改,只是升级了我的 django 和 python

【问题讨论】:

  • 粘贴用户型号代码?

标签: python django python-3.x django-2.2


【解决方案1】:

升级 djangorestframework 可能会有所帮助

pip install -U djangorestframework

【讨论】:

    猜你喜欢
    • 2014-10-06
    • 2017-09-05
    • 2018-11-03
    • 1970-01-01
    • 2020-04-19
    • 1970-01-01
    • 2014-10-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多