Add section markers

This commit is contained in:
Joakim Hellsén 2025-09-13 23:17:17 +02:00
commit 007b8f7ec6
7 changed files with 44 additions and 4 deletions

View file

@ -1,12 +1,17 @@
from __future__ import annotations
from typing import TYPE_CHECKING
from django.urls import path
from accounts import views
if TYPE_CHECKING:
from django.urls.resolvers import URLPattern
app_name = "accounts"
urlpatterns = [
urlpatterns: list[URLPattern] = [
path("login/", views.CustomLoginView.as_view(), name="login"),
path("logout/", views.CustomLogoutView.as_view(), name="logout"),
path("signup/", views.SignUpView.as_view(), name="signup"),

View file

@ -30,13 +30,13 @@ class CustomLoginView(LoginView):
Returns:
str: URL to redirect to after successful login.
"""
return reverse_lazy("twitch:dashboard")
return reverse_lazy("twitch:dashboard") # pyright: ignore[reportReturnType]
class CustomLogoutView(LogoutView):
"""Custom logout view."""
next_page = reverse_lazy("twitch:dashboard")
next_page = reverse_lazy("twitch:dashboard") # pyright: ignore[reportAssignmentType]
http_method_names = ["get", "post", "options"]
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse: