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 d7cd899
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 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
3 changes: 0 additions & 3 deletions scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,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.SuccessURLAllowedHostsMixin
django.contrib.contenttypes.admin.GenericInlineModelAdmin
django.contrib.contenttypes.admin.GenericInlineModelAdmin.ct_field
django.contrib.contenttypes.admin.GenericInlineModelAdmin.ct_fk_field
Expand Down

0 comments on commit d7cd899

Please sign in to comment.