I'm using a standard Django login but I'm getting this error: Error exiting in Django 4.2.1

huangapple go评论53阅读模式
英文:

I'm using a standard Django login but I'm getting this error: Error exiting in Django 4.2.1

问题

message error when clicking link to logout: 点击注销链接时出现消息错误

urlpatterns content django.contrib.auth.urls in urls.py: 在urls.py中包含django.contrib.auth.urls的URL模式内容

Variable LOGOUT_REDIRECT_URL in settings.py: 在settings.py中的变量LOGOUT_REDIRECT_URL

file html index content button html logout: HTML索引文件中的按钮HTML注销

I am creating logout, login works less logout: 我正在创建注销,登录正常工作,但注销有问题

英文:

enter image description heremessage error when clicking link to logout message error when clicking link to logout

urlpatterns content django.contrib.auth.urls in urls.py urlpatterns content django.contrib.auth.urls in urls.py

Variable LOGOUT_REDIRECT_URL in settins.py Variable LOGOUT_REDIRECT_URL in settins.py

file html index content button html logoutenter image description here

I am creating logout, login works less logout

答案1

得分: 0

你需要在你的应用程序中声明登录URL。在app.core.urls中添加login URL。

英文:

You have to declare the login URL in your app.
In app.core.urls add login URL.

huangapple
  • 本文由 发表于 2023年5月25日 01:57:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76326266.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定