【问题标题】:django-registration-redux falls with "Import error" exceptiondjango-registration-redux 出现“导入错误”异常
【发布时间】:2016-01-12 20:12:36
【问题描述】:

我已经在我的 virtualenv 中安装了 django-reg.-redux 然后我在 INSTALLED_APPS 中添加了“注册”应用程序, 但是当我输入 python manage.py migrate 我错过了什么包?stacktrace here

【问题讨论】:

    标签: django authentication


    【解决方案1】:

    您需要在注册应用程序中手动更新admin.py 文件。

    打开registration\admin.py,然后使用以下导入:

    from django.contrib.sites.requests import RequestSite
    

    而不是错误的导入:

    from django.contrib.sites.models import RequestSite
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-04
      • 2016-10-01
      相关资源
      最近更新 更多