Skip to content

Commit

Permalink
remove SuccessURLAllowedHostsMixin and replace it with RedirectURLMixin
Browse files Browse the repository at this point in the history
Per Django 4.1 release notes
(https://docs.djangoproject.com/en/4.2/releases/4.1/#miscellaneous):

"The undocumented django.contrib.auth.views.SuccessURLAllowedHostsMixin
mixin is replaced by RedirectURLMixin."
  • Loading branch information
si14 committed Aug 23, 2023
1 parent f2f949c commit 2b408dc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions django-stubs/contrib/auth/views.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,14 @@ class RedirectURLMixin:
def get_success_url_allowed_hosts(self) -> set[str]: ...
def get_default_redirect_url(self) -> str: ...

class SuccessURLAllowedHostsMixin:
success_url_allowed_hosts: Any
def get_success_url_allowed_hosts(self) -> set[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
Expand Down

0 comments on commit 2b408dc

Please sign in to comment.