【问题标题】:Django - ModuleNotFoundError: No module named 'alluth'Django - ModuleNotFoundError:没有名为“alluth”的模块
【发布时间】:2021-06-12 07:16:46
【问题描述】:

我在尝试进行迁移时遇到错误。我重新安装了应用程序,但仍然看到同样的错误。

这是我的设置文件:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    # 3rd Party
    'rest_framework',
    'rest_framework.authtoken',
    'allauth',
    'allauth.account',
    'alluth.socialaccount',
    'rest_auth',
    'rest_auth.registration',

    # Local
    'posts.apps.PostsConfig',
]

# Peculiar to django-allauth app
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

SITE_ID = 1

这是我运行python manage.py migrate时遇到的错误:

ModuleNotFoundError: No module named 'alluth'

【问题讨论】:

    标签: python django django-rest-framework django-allauth


    【解决方案1】:

    问题出在 INSTALLED APPS 的第 3 方部分。

    'alluth.socialaccount'

    打错字了,应该是

    'allauth.socialaccount',,关注alluth -> allauth

    【讨论】:

      猜你喜欢
      • 2019-03-08
      • 2021-08-06
      • 2019-11-28
      • 2018-11-03
      • 2019-01-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多