From d2fa5ce02f40a62a526ff1df741318a3121a1c6a Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Fri, 15 Oct 2021 12:43:17 +0200 Subject: [PATCH] Check upload form --- photo21/settings.py | 1 + photo21/templates/base.html | 12 +++++-- photologue_custom/forms.py | 26 +++++++++++++- .../templates/photologue/upload.html | 2 +- photologue_custom/views.py | 35 ++++++++++--------- 5 files changed, 54 insertions(+), 22 deletions(-) diff --git a/photo21/settings.py b/photo21/settings.py index b6967f2..5128667 100644 --- a/photo21/settings.py +++ b/photo21/settings.py @@ -203,6 +203,7 @@ EMAIL_HOST_PASSWORD = os.getenv('EMAIL_PASSWORD', None) # Mail will be sent from this address SERVER_EMAIL = "photos@crans.org" DEFAULT_FROM_EMAIL = f"Serveur photos <{SERVER_EMAIL}>" +EMAIL_SUBJECT_PREFIX = '[Serveur photos] ' # After login redirect user to transfer page LOGIN_REDIRECT_URL = '/' diff --git a/photo21/templates/base.html b/photo21/templates/base.html index a2d1633..44af685 100644 --- a/photo21/templates/base.html +++ b/photo21/templates/base.html @@ -35,10 +35,16 @@ SPDX-License-Identifier: GPL-3.0-or-later {% url 'photologue:pl-gallery-archive' as url %} {% trans 'Galleries' %} + {% if perms.photologue.add_gallery %} + + {% endif %} {% if request.user.is_staff %} - + {% endif %}