by Guest » 25 Dec 2024, 22:56
Code: Select all
Method Not Allowed (GET): /users/logout/
Method Not Allowed: /users/logout/
[10/Dec/2023 12:46:21] "GET /users/logout/ HTTP/1.1" 405 0
Dies passiert, als ich die URL
http://127.0.0.1:8000/users/logout/ aufgerufen habe.
Code: Select all
from django.contrib.auth import views as auth_views
urlpatterns = [
...other urls...
path('users/logout/', auth_views.LogoutView.as_view(), name='logout'),
]
Ich erwarte, dass sich der Benutzer abmeldet
[code]Method Not Allowed (GET): /users/logout/
Method Not Allowed: /users/logout/
[10/Dec/2023 12:46:21] "GET /users/logout/ HTTP/1.1" 405 0
[/code]
Dies passiert, als ich die URL http://127.0.0.1:8000/users/logout/ aufgerufen habe.
[code]urls.py:[/code]
[code]from django.contrib.auth import views as auth_views
urlpatterns = [
...other urls...
path('users/logout/', auth_views.LogoutView.as_view(), name='logout'),
]
[/code]
Ich erwarte, dass sich der Benutzer abmeldet