diff --git a/django-stubs/contrib/auth/views.pyi b/django-stubs/contrib/auth/views.pyi index b669fcf13..8992d334a 100644 --- a/django-stubs/contrib/auth/views.pyi +++ b/django-stubs/contrib/auth/views.pyi @@ -9,18 +9,23 @@ from django.views.generic.edit import FormView UserModel: Any -class SuccessURLAllowedHostsMixin: - success_url_allowed_hosts: Any +class RedirectURLMixin: + next_page: str | None + redirect_field_name: str + success_url_allowed_hosts: set[str] + def get_success_url(self) -> str: ... + def get_redirect_url(self) -> str: ... def get_success_url_allowed_hosts(self) -> set[str]: ... + def get_default_redirect_url(self) -> str: ... -class LoginView(SuccessURLAllowedHostsMixin, FormView[AuthenticationForm]): +class LoginView(RedirectURLMixin, FormView[AuthenticationForm]): authentication_form: Any redirect_field_name: Any redirect_authenticated_user: bool extra_context: Any def get_redirect_url(self) -> str: ... -class LogoutView(SuccessURLAllowedHostsMixin, TemplateView): +class LogoutView(RedirectURLMixin, TemplateView): next_page: str | None redirect_field_name: str extra_context: Any diff --git a/scripts/stubtest/allowlist_todo.txt b/scripts/stubtest/allowlist_todo.txt index 48b1268b7..ed9247434 100644 --- a/scripts/stubtest/allowlist_todo.txt +++ b/scripts/stubtest/allowlist_todo.txt @@ -237,14 +237,10 @@ django.contrib.auth.validators.UnicodeUsernameValidator.__new__ django.contrib.auth.validators.UnicodeUsernameValidator.deconstruct django.contrib.auth.views.INTERNAL_RESET_URL_TOKEN django.contrib.auth.views.LoginView.form_class -django.contrib.auth.views.LoginView.get_default_redirect_url -django.contrib.auth.views.LogoutView.get_default_redirect_url django.contrib.auth.views.LogoutView.get_next_page django.contrib.auth.views.PasswordChangeView.form_class django.contrib.auth.views.PasswordResetConfirmView.form_class django.contrib.auth.views.PasswordResetView.form_class -django.contrib.auth.views.RedirectURLMixin -django.contrib.auth.views.SuccessURLAllowedHostsMixin django.contrib.contenttypes.admin.GenericInlineModelAdmin django.contrib.contenttypes.admin.GenericInlineModelAdmin.ct_field django.contrib.contenttypes.admin.GenericInlineModelAdmin.ct_fk_field