From b7a71d911d22fe2adfd322ecdeb0dfc4b2b3490f Mon Sep 17 00:00:00 2001 From: bleizi Date: Mon, 12 Feb 2024 22:56:43 +0100 Subject: [PATCH] _get_validtion_exclusions() now return a set, PIL.Image.ANTIALIAS was renamed LANCZOS and typo in .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- apps/member/forms.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 23ba25aa..4f041867 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ py310-django42: python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache python3-bs4 python3-setuptools tox texlive-xetex - script: tox -e py38-django42 + script: tox -e py310-django42 # Debian Bookworm py311-django42: diff --git a/apps/member/forms.py b/apps/member/forms.py index 420b35a4..0d78c726 100644 --- a/apps/member/forms.py +++ b/apps/member/forms.py @@ -33,7 +33,7 @@ class UserForm(forms.ModelForm): # Django usernames can only contain letters, numbers, @, ., +, - and _. # We want to allow users to have uncommon and unpractical usernames: # That is their problem, and we have normalized aliases for us. - return super()._get_validation_exclusions() + ["username"] + return super()._get_validation_exclusions() | {"username"} class Meta: model = User @@ -122,7 +122,7 @@ class ImageForm(forms.Form): frame = frame.crop((x, y, x + w, y + h)) frame = frame.resize( (settings.PIC_WIDTH, settings.PIC_RATIO * settings.PIC_WIDTH), - Image.ANTIALIAS, + Image.LANCZOS, ) frames.append(frame)