From 92941f9a921599d8eecdcc454c66bcd5b288efee Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sun, 19 Feb 2023 12:21:38 +0100 Subject: [PATCH] Fix tests, fix Django deprecation warnings --- MANIFEST.in | 2 -- gvacommon/tests/test_viewmixins.py | 1 + gvacommon/viewmixins.py | 6 ++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 6f0230f..e72662c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,2 @@ include COPYING include README.rst -include requirements.txt -include requirements/*.txt diff --git a/gvacommon/tests/test_viewmixins.py b/gvacommon/tests/test_viewmixins.py index 6b176b5..f745b75 100644 --- a/gvacommon/tests/test_viewmixins.py +++ b/gvacommon/tests/test_viewmixins.py @@ -32,6 +32,7 @@ from django.views.generic import View if not settings.configured: settings.configure( DEBUG=True, + SECRET_KEY="unused#secret", ROOT_URLCONF='tests', TEMPLATE_DIRS=['.'], DATABASES={ diff --git a/gvacommon/viewmixins.py b/gvacommon/viewmixins.py index 96b8368..5f0a0b7 100644 --- a/gvacommon/viewmixins.py +++ b/gvacommon/viewmixins.py @@ -1,6 +1,6 @@ # # gvacommon - common parts of gnuviechadmin -# Copyright (C) 2015-2016 Jan Dittberner +# Copyright (C) 2015-2023 Jan Dittberner # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -19,11 +19,9 @@ This module defines mixins for gnuviechadmin views. """ -from __future__ import unicode_literals - from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseForbidden -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ class StaffOrSelfLoginRequiredMixin(LoginRequiredMixin):