方法不允许(GET):/users/logout/方法不允许:/users/logout/[10/Dec/2023 12:46:21] \'GET /users/logout/ HTTP/1.1\' 405 0当我访问 url http://127.0.0.1 时发生这种情况:
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
当我访问 URL http://127.0.0.1:8000/users/logout/
urls.py:
from django.contrib.auth import views as auth_views
urlpatterns = [
...other urls...
path('users/logout/', auth_views.LogoutView.as_view(), name='logout'),
]
我希望用户注销