Unifomize license headers

This commit is contained in:
Alexandre Iooss 2022-03-11 17:16:11 +01:00
parent 9dc40279fa
commit 8d44182af8
51 changed files with 249 additions and 135 deletions

View file

@ -1,4 +1,7 @@
#!/bin/sh
# Backup script to put in /etc/cron.montly/
# 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
rsync -avP /var/www/photos/photo21 /backup/
sudo -u postgres pg_dump photo21 > /backup/pg_dump_photo21.sql

View file

@ -1,3 +1,7 @@
# 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
server {
listen 80;
listen [::]:80;

View file

@ -1,3 +1,7 @@
# 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
[uwsgi]
# www-data can write media
uid = www-data

View file

@ -5,7 +5,7 @@ import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'photo21.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "photo21.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
@ -17,5 +17,5 @@ def main():
execute_from_command_line(sys.argv)
if __name__ == '__main__':
if __name__ == "__main__":
main()

View file

@ -0,0 +1,3 @@
# 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

View file

@ -1,3 +1,7 @@
# 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 import forms
from django.utils.translation import gettext_lazy as _
from allauth.account.forms import SignupForm
@ -18,7 +22,9 @@ class CustomSignupForm(SignupForm):
Check that the email address ends with a trusted domain.
"""
email = super().clean_email()
if not email.endswith("@crans.org") and not email.endswith("@ens-paris-saclay.fr"):
if not email.endswith("@crans.org") and not email.endswith(
"@ens-paris-saclay.fr"
):
raise forms.ValidationError(
_("Must end with `@crans.org` or `@ens-paris-saclay.fr`.")
)

View file

@ -1,3 +1,7 @@
# 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
import hashlib
import base64
from collections import OrderedDict
@ -15,11 +19,12 @@ class SHA512PasswordHasher(BasePasswordHasher):
It is used to migrate passwords from old Symfony2 photos server.
https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php
"""
algorithm = "sha512"
def encode(self, password, iteration, salt):
assert password is not None
assert salt and '$' not in salt
assert salt and "$" not in salt
salted = force_bytes(password + "{" + salt + "}")
digest = hashlib.sha512(salted).digest()
# "stretch" hash
@ -30,19 +35,21 @@ class SHA512PasswordHasher(BasePasswordHasher):
return encoded[:128]
def verify(self, password, encoded):
algorithm, iteration, salt, hash = encoded.split('$', 3)
algorithm, iteration, salt, hash = encoded.split("$", 3)
assert algorithm == self.algorithm
encoded_2 = self.encode(password, iteration, salt)
return constant_time_compare(encoded, encoded_2)
def safe_summary(self, encoded):
algorithm, iteration, salt, hash = encoded.split('$', 3)
algorithm, iteration, salt, hash = encoded.split("$", 3)
assert algorithm == self.algorithm
return OrderedDict([
(_('algorithm'), algorithm),
(_('salt'), mask_hash(salt, show=2)),
(_('hash'), mask_hash(hash)),
])
return OrderedDict(
[
(_("algorithm"), algorithm),
(_("salt"), mask_hash(salt, show=2)),
(_("hash"), mask_hash(hash)),
]
)
def harden_runtime(self, password, encoded):
pass

View file

@ -1,7 +1,6 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# 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
#
#, fuzzy
msgid ""

View file

@ -1,7 +1,6 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# 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
#
#, fuzzy
msgid ""

View file

@ -1,7 +1,6 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# 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
#
#, fuzzy
msgid ""

View file

@ -1,8 +1,10 @@
# 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
"""
Django settings for photo21 project.
Generated by 'django-admin startproject' using Django 2.2.24.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
@ -23,7 +25,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'CHANGE ME'
SECRET_KEY = "CHANGE ME"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
@ -38,7 +40,7 @@ ALLOWED_HOSTS = [
# Admins receive server errors, this is useful to be notified of potential bugs
# By default MANAGERS=ADMINS, so admins also receive upload notifications
ADMINS = [
('admin', 'photos-admin@lists.crans.org'),
("admin", "photos-admin@lists.crans.org"),
]
# Use secure cookies in production
@ -53,47 +55,47 @@ SECURE_HSTS_PRELOAD = True
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth_note_kfet',
'crispy_forms',
'photologue',
"django.contrib.admin",
"django.contrib.admindocs",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.sites",
"django.contrib.messages",
"django.contrib.staticfiles",
"allauth",
"allauth.account",
"allauth.socialaccount",
"allauth_note_kfet",
"crispy_forms",
"photologue",
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.sites.middleware.CurrentSiteMiddleware',
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.contrib.sites.middleware.CurrentSiteMiddleware",
]
ROOT_URLCONF = 'photo21.urls'
ROOT_URLCONF = "photo21.urls"
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'photo21/templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [os.path.join(BASE_DIR, "photo21/templates")],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
},
},
@ -101,22 +103,21 @@ TEMPLATES = [
AUTHENTICATION_BACKENDS = [
# Needed to login by username in Django admin, regardless of `allauth`
'django.contrib.auth.backends.ModelBackend',
"django.contrib.auth.backends.ModelBackend",
# `allauth` specific authentication methods, such as login by e-mail
'allauth.account.auth_backends.AuthenticationBackend',
"allauth.account.auth_backends.AuthenticationBackend",
]
WSGI_APPLICATION = 'photo21.wsgi.application'
WSGI_APPLICATION = "photo21.wsgi.application"
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
}
}
@ -126,38 +127,38 @@ DATABASES = {
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
]
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
'photo21.hashers.SHA512PasswordHasher',
"django.contrib.auth.hashers.PBKDF2PasswordHasher",
"photo21.hashers.SHA512PasswordHasher",
]
# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/
TIME_ZONE = 'UTC'
TIME_ZONE = "UTC"
USE_TZ = True
# Limit available languages to this subset
LANGUAGES = [
('de', _('German')),
('en', _('English')),
('es', _('Spanish')),
('fr', _('French')),
("de", _("German")),
("en", _("English")),
("es", _("Spanish")),
("fr", _("French")),
]
# Allow more fields in URL to edit large galleries
@ -166,9 +167,9 @@ DATA_UPLOAD_MAX_NUMBER_FIELDS = 10240
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL = '/static/'
STATIC_URL = "/static/"
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'photo21/static'),
os.path.join(BASE_DIR, "photo21/static"),
]
# Collect statics to /static/
@ -177,48 +178,48 @@ STATIC_ROOT = os.path.join(BASE_DIR, "static/")
# Use /media/ for user uploaded media
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
MEDIA_URL = '/media/'
MEDIA_URL = "/media/"
LOCALE_PATHS = [os.path.join(BASE_DIR, 'photo21/locale')]
LOCALE_PATHS = [os.path.join(BASE_DIR, "photo21/locale")]
FIXTURE_DIRS = [os.path.join(BASE_DIR, 'photo21/fixtures')]
FIXTURE_DIRS = [os.path.join(BASE_DIR, "photo21/fixtures")]
# Do not send email during debug
# By default Django sends mails to localhost:25 without authentification
if DEBUG:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
# 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] '
EMAIL_SUBJECT_PREFIX = "[Serveur photos] "
# After login redirect user to transfer page
LOGIN_REDIRECT_URL = '/'
LOGIN_REDIRECT_URL = "/"
# Use only one Django Sites
SITE_ID = 1
# Django message
MESSAGE_TAGS = {
messages.DEBUG: 'alert-secondary',
messages.INFO: 'alert-info',
messages.SUCCESS: 'alert-success',
messages.WARNING: 'alert-warning',
messages.ERROR: 'alert-danger',
messages.DEBUG: "alert-secondary",
messages.INFO: "alert-info",
messages.SUCCESS: "alert-success",
messages.WARNING: "alert-warning",
messages.ERROR: "alert-danger",
}
# Allauth configuration
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
ACCOUNT_AUTHENTICATION_METHOD = "username_email"
ACCOUNT_FORMS = {'signup': 'photo21.forms.CustomSignupForm'}
ACCOUNT_FORMS = {"signup": "photo21.forms.CustomSignupForm"}
SOCIALACCOUNT_PROVIDERS = {
'notekfet': {
"notekfet": {
# Fetch user profile
'SCOPE': ['1_1'],
"SCOPE": ["1_1"],
},
}
# Use Bootstrap forms
CRISPY_TEMPLATE_PACK = 'bootstrap4'
CRISPY_TEMPLATE_PACK = "bootstrap4"

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}

View file

@ -1,6 +1,8 @@
{% extends "base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-2.0-or-later
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
{% endcomment %}
{% block title %}{% block head_title %}{% endblock %}{% endblock title %}

View file

@ -1,6 +1,8 @@
{% extends "account/base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-2.0-or-later
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
{% endcomment %}
{% load i18n crispy_forms_tags %}
{% block head_title %}{% trans "E-mail Addresses" %}{% endblock %}

View file

@ -1,6 +1,8 @@
{% extends "account/base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-2.0-or-later
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
{% endcomment %}
{% load i18n crispy_forms_tags account socialaccount %}
{% block head_title %}{% trans "Sign In" %}{% endblock %}

View file

@ -1,6 +1,8 @@
{% extends "account/base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-2.0-or-later
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
{% endcomment %}
{% load i18n %}
{% block head_title %}{% trans "Sign Out" %}{% endblock %}

View file

@ -1,6 +1,8 @@
{% extends "account/base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-2.0-or-later
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
{% endcomment %}
{% load i18n crispy_forms_tags %}
{% block head_title %}{% trans "Signup" %}{% endblock %}

View file

@ -1,4 +1,6 @@
{% comment %}
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
{% endcomment %}
{% load static i18n %}

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}

View file

@ -1,6 +1,8 @@
{% extends "socialaccount/base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-2.0-or-later
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
{% endcomment %}
{% load i18n %}
{% block head_title %}{% trans "Account Connections" %}{% endblock %}

View file

@ -1,18 +1,13 @@
# 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
"""photo21 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import include, path, re_path
from django.conf import settings
@ -21,16 +16,18 @@ from django.conf.urls.static import static
from .views import IndexView, MediaAccess
urlpatterns = [
path('', IndexView.as_view(), name='index'),
path('', include('photologue.urls', namespace='photologue')),
path('accounts/', include('allauth.urls')),
path('i18n/', include('django.conf.urls.i18n')),
path('admin/doc/', include('django.contrib.admindocs.urls')),
path('admin/', admin.site.urls),
path("", IndexView.as_view(), name="index"),
path("", include("photologue.urls", namespace="photologue")),
path("accounts/", include("allauth.urls")),
path("i18n/", include("django.conf.urls.i18n")),
path("admin/doc/", include("django.contrib.admindocs.urls")),
path("admin/", admin.site.urls),
]
# In production media are served through NGINX with X-Accel-Redirect
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
else:
urlpatterns.append(re_path('^media/(?P<path>.*)', MediaAccess.as_view(), name='media'))
urlpatterns.append(
re_path("^media/(?P<path>.*)", MediaAccess.as_view(), name="media")
)

View file

@ -1,4 +1,5 @@
# Copyright (C) 2021 by BDE ENS Paris-Saclay
# This file is part of photo21
# Copyright (C) 2021-2022 Amicale des élèves de l'ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from django.contrib.auth.mixins import LoginRequiredMixin
@ -11,8 +12,8 @@ class MediaAccess(LoginRequiredMixin, View):
def get(self, request, path):
response = HttpResponse()
# Content-type will be detected by nginx
del response['Content-Type']
response['X-Accel-Redirect'] = '/protected/media/' + path
del response["Content-Type"]
response["X-Accel-Redirect"] = "/protected/media/" + path
return response

View file

@ -1,3 +1,7 @@
# 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
"""
WSGI config for photo21 project.
@ -11,6 +15,6 @@ import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'photo21.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "photo21.settings")
application = get_wsgi_application()

View file

@ -0,0 +1,3 @@
# 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

View file

@ -1,3 +1,7 @@
# 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.contrib import admin
from django.utils.translation import gettext_lazy as _

View file

@ -1,3 +1,7 @@
# 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

View file

@ -1,3 +1,7 @@
# 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
import datetime
from crispy_forms.helper import FormHelper

View file

@ -1,6 +1,6 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# 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
#
# Translators:
# Translators:

View file

@ -1,6 +1,6 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# 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
#
# Translators:
# Translators:

View file

@ -1,6 +1,6 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# 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
#
# Translators:
# Translators:

View file

@ -1,3 +1,7 @@
# 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
import hashlib
from django.core.management.base import BaseCommand, CommandError

View file

@ -1,3 +1,7 @@
# 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
import os
from pathlib import Path

View file

@ -1,4 +1,6 @@
# Generated by Django 3.2.11 on 2022-01-30 10:14
# 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
import django.core.validators
import django.db.models.deletion

View file

@ -1,4 +1,6 @@
# Generated by Django 3.2.11 on 2022-01-30 10:20
# 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.db import migrations

View file

@ -1,4 +1,6 @@
# Generated by Django 3.2.11 on 2022-01-30 12:14
# 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.db import migrations

View file

@ -0,0 +1,3 @@
# 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

View file

@ -1,6 +1,8 @@
/*
* Custom LightGallery plugin to add some buttons for administration
*
* 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
*/

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load static i18n %}

View file

@ -1,3 +1,8 @@
{% comment %}
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
{% endcomment %}
{% load i18n %}
<div class="card text-white bg-dark">

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}

View file

@ -1,4 +1,9 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n %}
{% block title %}{{ object.name }}{% endblock %}

View file

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% comment %}
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
{% endcomment %}
{% load i18n crispy_forms_tags %}

View file

@ -1,3 +1,7 @@
# 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.urls import path, re_path
from .views import (

View file

@ -1,4 +1,5 @@
# Copyright (C) 2021 by BDE ENS Paris-Saclay
# This file is part of photo21
# Copyright (C) 2021-2022 Amicale des élèves de l'ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
import os