diff --git a/.forgejo/workflows/docker.yml b/.forgejo/workflows/docker.yml index e5da6fc..90f3a7c 100644 --- a/.forgejo/workflows/docker.yml +++ b/.forgejo/workflows/docker.yml @@ -22,12 +22,11 @@ jobs: username: ${{ secrets.REGISTRY_USER }} password: ${{ secrets.REGISTRY_TOKEN }} - - name: Build and push image + - name: Build image run: | - docker build \ - -t git.sinfonie.org/sinfonie/photo26:${{ steps.meta.outputs.TAG }} \ - -t git.sinfonie.org/sinfonie/photo26:latest \ - . - docker push git.sinfonie.org/sinfonie/photo26:${{ steps.meta.outputs.TAG }} - docker push git.sinfonie.org/sinfonie/photo26:latest + docker build -t git.sinfonie.org/sinfonie/photo26:${{ steps.meta.outputs.TAG }} . + + - name: Push image + run: | + docker push git.sinfonie.org/sinfonie/photo26:${{ steps.meta.outputs.TAG }} diff --git a/allauth_oauth/apps.py b/allauth_oauth/apps.py deleted file mode 100644 index 69b727a..0000000 --- a/allauth_oauth/apps.py +++ /dev/null @@ -1,12 +0,0 @@ -# This file is part of photo21 -# Copyright (C) 2022 Amicale des élèves de l'ENS Paris-Saclay -# SPDX-License-Identifier: GPL-3.0-or-later - -from django.apps import AppConfig - - -class AllauthOAuthConfig(AppConfig): - name = "allauth_oauth" - - def ready(self): - import allauth_oauth.signals # noqa: F401 diff --git a/allauth_oauth/signals.py b/allauth_oauth/signals.py deleted file mode 100644 index d7f1cf6..0000000 --- a/allauth_oauth/signals.py +++ /dev/null @@ -1,29 +0,0 @@ -# This file is part of photo21 -# Copyright (C) 2022 Amicale des élèves de l'ENS Paris-Saclay -# SPDX-License-Identifier: GPL-3.0-or-later - -from allauth.socialaccount.signals import pre_social_login -from django.dispatch import receiver - - -@receiver(pre_social_login) -def sync_user_fields(sender, request, sociallogin, **kwargs): - if not sociallogin.is_existing: - return - - user = sociallogin.user - data = sociallogin.account.extra_data - changed = False - - email = data.get("email") - if email and user.email != email: - user.email = email - changed = True - - username = data.get("username") - if username and user.username != username: - user.username = username - changed = True - - if changed: - user.save() diff --git a/photo21/settings.py b/photo21/settings.py index 422f2c7..953a8c2 100644 --- a/photo21/settings.py +++ b/photo21/settings.py @@ -166,15 +166,9 @@ CACHES = { "default": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", "LOCATION": "Master", - }, - "select2": { - "BACKEND": "django.core.cache.backends.filebased.FileBasedCache", - "LOCATION": "/tmp/django_select2_cache", - }, + } } -SELECT2_CACHE_BACKEND = "select2" - # Password validation # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators diff --git a/photo21/templates/base.html b/photo21/templates/base.html index ccd17c2..91f63cb 100644 --- a/photo21/templates/base.html +++ b/photo21/templates/base.html @@ -37,7 +37,6 @@ SPDX-License-Identifier: GPL-3.0-or-later