缺少模块Django_auth_ldap?

2024-03-29 12:25:58 发布

您现在位置:Python中文网/ 问答频道 /正文

所有关于ldap和Django的教程都是从

import ldap
from django_auth_ldap.config import LDAPSearch

但不管我犯了什么错误:

ImportError: Could not import settings 'reportgenerator.settings' (Is it on sys.path?
Is there an import error in the settings file?): No module named 
django_auth_ldap.config

我遗漏了什么吗?我已经安装了python ldap。

通过在命令行上运行以下命令解决了此问题:

pip install django-auth-ldap

Tags: djangofromimportauthconfigsettingsis错误