英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论