Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
django()中的NoReverseMatch at/accounts/login/in_Django - Fatal编程技术网

django()中的NoReverseMatch at/accounts/login/in

django()中的NoReverseMatch at/accounts/login/in,django,Django,strong文本 找不到“验证密码重置”的反向项auth_password_reset'不是有效的视图函数或模式名称 请告诉我如何解决此错误错误在html文件中,您可能会使用auth_password_reset作为url,但django找不到url,因此引发错误 以下是一些可能的错误: 您没有给任何url命名为“auth\u password\u reset”,因此django找不到它 如果你使用的是任何应用程序名称,你也必须包含该名称。 例如: url.py app_name = 'ap

strong文本

找不到“验证密码重置”的反向项auth_password_reset'不是有效的视图函数或模式名称


请告诉我如何解决此错误

错误在html文件中,您可能会使用auth_password_reset作为url,但django找不到url,因此引发错误

以下是一些可能的错误:

  • 您没有给任何url命名为“auth\u password\u reset”,因此django找不到它

  • 如果你使用的是任何应用程序名称,你也必须包含该名称。 例如:

  • url.py

    app_name = 'app_one'
    
    urlpatterns=[
        path('home/', views.auth_password_reset, name='auth_password_reset'),
    ]
    
    html文件:

    {% url 'app_one:auth_password_reset' %}
    

    共享您的
    url.py
    ,其中包括身份验证视图。请包括代码,而不是代码的图像: