From 2fdb73e4855fe5bdc0992b9bce0aa061e308e764 Mon Sep 17 00:00:00 2001 From: sinavir Date: Sat, 22 Jun 2024 23:05:51 +0200 Subject: [PATCH] Rename get_next_page to get_success_url and update pyproject From django 4.1, this function has been renamed (https://docs.djangoproject.com/en/4.2/releases/4.1/) --- pyproject.toml | 7 +++---- src/authens/views.py | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 54b9c17..0cf9ac9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,9 +16,8 @@ classifiers = [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", - "Framework :: Django :: 2.2", - "Framework :: Django :: 3.1", - "Framework :: Django :: 3.2", + "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", @@ -33,7 +32,7 @@ classifiers = [ "Topic :: Internet :: WWW/HTTP :: Dynamic Content", ] dependencies = [ - "django >= 2.2", + "django >= 4.1", "python-ldap >= 3, < 4", "python-cas >= 1.5, < 2", ] diff --git a/src/authens/views.py b/src/authens/views.py index 0478861..b1c93e9 100644 --- a/src/authens/views.py +++ b/src/authens/views.py @@ -138,8 +138,8 @@ class LogoutView(auth_views.LogoutView): else: self.cas_connected = False - def get_next_page(self): - next_page = super().get_next_page() + def get_success_url(self): + next_page = super().get_success_url() if self.cas_connected: cas_client = get_cas_client(self.request) -- 2.45.1