使用 MongoDB 重置 Django 密码 - DatabaseError 没有异常消息

Django password reset with MongoDB - DatabaseError with no exception message

我已将我的 Django 应用程序与 MongoDB 连接,register/login/logout 一切正常。但是当我使用 Django 默认密码重置电子邮件时,它会引发数据库错误。

我累了:

我能够登陆 Django 密码重置页面,但是当我点击确认时 return 浏览器上的错误

DatabaseError at /pw_reset/
No exception message supplied
Request Method: POST
Request URL:    http://localhost:8000/pw_reset/
Django Version: 3.2.6
Exception Type: DatabaseError
Exception Location:  
C:...venv\lib\site-packages\djongo\cursor.py, line 59, in execute

The above exception ( Keyword: None Sub SQL: None FAILED SQL: ('SELECT "accounts_user"."id", "accounts_user"."password", "accounts_user"."last_login", "accounts_user"."is_superuser", "accounts_user"."username", "accounts_user"."first_name", "accounts_user"."last_name", "accounts_user"."email", "accounts_user"."is_staff", "accounts_user"."is_active", "accounts_user"."date_joined" FROM "accounts_user" WHERE ("accounts_user"."email" iLIKE %(0)s AND "accounts_user"."is_active")',) Params: (('test@test.com',),) Version: 1.3.6) was the direct cause of the following exception:

控制台日志:

Traceback (most recent call last):
  File "C:...\lib\site-packages\django\template\base.py", line 850, in _resolve_lookup   
    (bit, current))  # missing attribute
django.template.base.VariableDoesNotExist: Failed lookup for key [name] in <URLResolver <URLPattern list> (admin:admin) 'admin/'>

URL路径:

path('pw_reset/', auth_views.PasswordResetView.as_view(), name="reset_password"),

我自己定义的视图 (register/login/logout) 都运行良好。但是内置的一个PasswordRestView是没有的。我试过删除数据库,重新安装 djongo,我 运行 没有想法...请帮忙!

已通过降级版本修复:

Django==3.0.5
djongo==1.3.4
sqlparse==0.2.4