Проблемы с реализацией функции выхода из системы
я пытаюсь реализовать выход из системы, но каждый раз выкидывает [21/Feb/2024 00:11:58] "GET /logout/ HTTP/1.1" 405 0 если я пытаюсь выйти из системы через drf view, нажав на admin -> logout, то возникает та же ошибка [21/Feb/2024 00:11:58] "GET /logout/ HTTP/1.1" 405 0
questionTime/urls.py
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.contrib.auth.views import LogoutView
from django.urls import include, path, re_path
from django_registration.backends.one_step.views import RegistrationView
from core.views import IndexTemplateView
from users import views as ws
from users.forms import CustomUserForm
urlpatterns = [
path('admin/', admin.site.urls),
path(
"accounts/register/", RegistrationView.as_view(form_class=CustomUserForm, success_url="/",),
name="django_registration_register",),
path("api-auth/logout/", auth_views.LogoutView.as_view(), name="rest_logout"),
path('logout/', LogoutView.as_view(next_page=settings.LOGOUT_REDIRECT_URL), name='logout'),
path("accounts/", include("django.contrib.auth.urls")),
path("api-auth/", include("rest_framework.urls")),
path('auth/', include('djoser.urls')),
path('auth/', include('djoser.urls.authtoken')),
path("api/v1/", include("questions.api.urls")),
path("api-auth/logout/", LogoutView.as_view(), name="rest_logout"),
re_path(r"^.*$", IndexTemplateView.as_view(), name="entry-point"),
]
settings.py
LOGOUT_URL = '/logout/'
LOGOUT_REDIRECT_URL = "/"
он должен выйти из пользователя