在使用django-simple-captcha中报错误 Exception Type:ImproperlyConfigured
1.错误代码图片
2.检查一下配置是否有问题(settings.py)
3.检查一下 路由是否带有其他字符(必须在主路由中配置)
from django.urls import path, re_path, include
urlpatterns = [
re_path(r'captcha/',include("captcha.urls")),
path('captcha/',include("captcha.urls"))
]
注意:用re_path配置路由的时候,不能够带上 $ 符号,如下配置为错误设置路由
from django.urls import path, re_path, include
urlpatterns = [
re_path(r'captcha/$',include("captcha.urls")),
]