【发布时间】:2022-10-17 17:11:15
【问题描述】:
我正在尝试从 captcha.fields 导入 ReCaptchaField。但是我收到了这个错误-
ImportError: cannot import name 'ReCaptchaField' from 'captcha.fields'
【问题讨论】:
-
the docs 中没有
ReCaptchaField- 不应该是CaptchaField吗?另外,请提供您使用的外来软件包的 github/pypi 链接(或至少pip install命令)。 -
我已经完成了 pip install captcha、pip install recaptcha 和 pip install django-simple-captcha。
-
出色地。当您从
captcha发送import时,您使用的是django-simple-captcha。里面没有ReCaptchaField。请不要pip install recaptcha:它已经10岁了,没有维护。 -
那解决了!非常感谢 :)
标签: python django recaptcha captcha