From 6932e4d5b63632b6fc885f8a5e1ff544919c713b Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Wed, 14 Dec 2022 21:44:22 +0100 Subject: [PATCH] Use RedirectURLMixin replacing SuccessURLAllowedHostsMixin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This also bumps Django to 4.1 because this undocumented API was changed in a minor release… --- aleksis/core/mixins.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aleksis/core/mixins.py b/aleksis/core/mixins.py index e1f08e9c2..f4ae9a9d0 100644 --- a/aleksis/core/mixins.py +++ b/aleksis/core/mixins.py @@ -6,7 +6,7 @@ from typing import Any, Callable, List, Optional, Union from django.conf import settings from django.contrib import messages -from django.contrib.auth.views import LoginView, SuccessURLAllowedHostsMixin +from django.contrib.auth.views import LoginView, RedirectURLMixin from django.contrib.contenttypes.models import ContentType from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site @@ -465,7 +465,7 @@ class SuccessMessageMixin(ModelFormMixin): return super().form_valid(form) -class SuccessNextMixin(SuccessURLAllowedHostsMixin): +class SuccessNextMixin(RedirectURLMixin): redirect_field_name = "next" def get_success_url(self) -> str: diff --git a/pyproject.toml b/pyproject.toml index ea5efd732..bcb007634 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ secondary = true [tool.poetry.dependencies] python = "^3.9" -Django = "^4.0" +Django = "^4.1" django-any-js = "^1.1" django-menu-generator-ng = "^1.2.3" django-tables2 = "^2.1" -- GitLab