Compare commits

..

1 commit

Author SHA1 Message Date
b286fbd570 feat(bda): add virement bancaire payment option 2024-10-17 23:19:25 +02:00
31 changed files with 214 additions and 1198 deletions

View file

@ -1 +0,0 @@
0x0000000000000000000000000000000000000000

View file

@ -1 +0,0 @@
10000000-ffff-ffff-ffff-000000000001

View file

@ -1 +0,0 @@
k-feste_token

View file

@ -1 +0,0 @@
insecure-key

View file

@ -18,7 +18,7 @@ Il vous faudra installer pip, les librairies de développement de python ainsi
que sqlite3, un moteur de base de données léger et simple d'utilisation. Sous
Debian et dérivées (Ubuntu, ...) :
sudo apt-get install python3-pip python3-dev python3-venv sqlite3 libsasl2-dev python-dev-is-python3 libldap2-dev libssl-dev
sudo apt-get install python3-pip python3-dev python3-venv sqlite3
Si vous décidez d'utiliser un environnement virtuel Python (virtualenv;
fortement conseillé), déplacez-vous dans le dossier où est installé GestioCOF
@ -30,15 +30,7 @@ Pour l'activer, il faut taper
. venv/bin/activate
depuis le même dossier. Pour préparer l'environnement à l'utilisation de `./manage.py`
(qui permet de faire des tests en local), il faut également taper
export CREDENTIALS_DIRECTORY=$(realpath .credentials)
export DJANGO_SETTINGS_MODULE=gestioasso.settings.local
export GESTIOCOF_DEBUG=true
export GESTIOCOF_STATIC_ROOT=$(realpath .static)
export GESTIOBDS_DEBUG=true
export GESTIOBDS_STATIC_ROOT=$(realpath .static)
depuis le même dossier.
Vous pouvez maintenant installer les dépendances Python depuis le fichier
`requirements-devel.txt` :

View file

@ -151,6 +151,7 @@ PAYMENT_TYPES = (
("cash", "Cash"),
("cb", "CB"),
("cheque", "Chèque"),
("virmt", "Virement bancaire"),
("autre", "Autre"),
)

View file

@ -67,8 +67,8 @@ INSTALLED_APPS = (
"wagtail.images",
"wagtail.search",
"wagtail.admin",
"wagtail",
# "wagtail.contrib.modeladmin",
"wagtail.core",
"wagtail.contrib.modeladmin",
"wagtail.contrib.routable_page",
"wagtailmenus",
"modelcluster",

View file

@ -1,194 +0,0 @@
"""
Django settings for the gestioBDS project.
"""
import os
from pathlib import Path
from loadcredential import Credentials
credentials = Credentials(env_prefix="GESTIOBDS_")
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# WARNING: keep the secret key used in production secret!
SECRET_KEY = credentials["SECRET_KEY"]
# WARNING: don't run with debug turned on in production!
DEBUG = credentials.get_json("DEBUG", False)
ALLOWED_HOSTS = credentials.get_json("ALLOWED_HOSTS", [])
ADMINS = credentials.get_json("ADMINS", [])
SERVER_EMAIL = credentials.get("SERVER_EMAIL")
EMAIL_HOST = credentials.get("EMAIL_HOST")
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
##
# Installed Apps configuration
INSTALLED_APPS = [
"shared",
# Must be before 'django.contrib.admin'.
# https://django-autocomplete-light.readthedocs.io/en/master/install.html
"dal",
"dal_select2",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.sites",
"django.contrib.messages",
"django.contrib.admin",
"django.contrib.admindocs",
"gestioasso.apps.IgnoreSrcStaticFilesConfig",
"django_cas_ng",
"bootstrapform",
"widget_tweaks",
"bds",
"events",
"clubs",
"authens",
]
##
# Middleware configuration
MIDDLEWARE = [
"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.security.SecurityMiddleware",
"django.middleware.locale.LocaleMiddleware",
]
##
# URL configuration
ROOT_URLCONF = "gestioasso.urls"
##
# Templates configuration
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"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",
"django.template.context_processors.i18n",
"django.template.context_processors.media",
"django.template.context_processors.static",
]
},
}
]
##
# Database configuration
DATABASES = credentials.get_json(
"DATABASES",
default={
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": (BASE_DIR / "db.sqlite3"),
}
},
)
CACHES = credentials.get_json(
"CACHES",
default={
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
},
},
)
CORS_ORIGIN_WHITELIST = credentials.get("CORS_ORIGIN_WHITELIST", [])
SITE_ID = 1
###
# Staticfiles configuration
STATIC_ROOT = credentials["STATIC_ROOT"]
STATIC_URL = "/static/"
MEDIA_ROOT = credentials.get("MEDIA_ROOT", (BASE_DIR / "media"))
MEDIA_URL = "/media/"
##
# Authens and Authentication configuration
AUTHENTICATION_BACKENDS = [
"django.contrib.auth.backends.ModelBackend",
"authens.backends.ENSCASBackend",
"authens.backends.OldCASBackend",
]
AUTHENS_USE_OLDCAS = False
LOGIN_URL = "authens:login"
LOGIN_REDIRECT_URL = "bds:home"
LOGOUT_REDIRECT_URL = "bds:home"
# ---
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
# ---
LANGUAGE_CODE = "fr-fr"
TIME_ZONE = "Europe/Paris"
USE_I18N = True
USE_L10N = True
USE_TZ = True
LANGUAGES = (("fr", "Français"), ("en", "English"))
FORMAT_MODULE_PATH = "gestioasso.locale"
##
# Development configuration
if DEBUG:
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
def show_toolbar(request):
"""
On active la debug-toolbar en mode développement local sauf :
- dans l'admin où ça ne sert pas à grand chose;
- si la variable d'environnement DJANGO_NO_DDT est à 1 → ça permet de la désactiver
sans modifier ce fichier en exécutant `export DJANGO_NO_DDT=1` dans le terminal
qui lance `./manage.py runserver`.
Autre side effect de cette fonction : on ne fait pas la vérification de INTERNAL_IPS
que ferait la debug-toolbar par défaut, ce qui la fait fonctionner aussi à
l'intérieur de Vagrant (comportement non testé depuis un moment…)
"""
env_no_ddt = bool(os.environ.get("DJANGO_NO_DDT", None))
return not (env_no_ddt or request.path.startswith("/admin/"))
##
# Django Debug Toolbar configuration
DEBUG_TOOLBAR_CONFIG = {"SHOW_TOOLBAR_CALLBACK": show_toolbar}
INSTALLED_APPS += ["debug_toolbar"]
MIDDLEWARE = ["debug_toolbar.middleware.DebugToolbarMiddleware"] + MIDDLEWARE

View file

@ -1,318 +0,0 @@
"""
Django settings for the gestioCOF project.
"""
import os
from datetime import datetime, timedelta
from pathlib import Path
from django.urls import reverse_lazy
from loadcredential import Credentials
credentials = Credentials(env_prefix="GESTIOCOF_")
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# WARNING: keep the secret key used in production secret!
SECRET_KEY = credentials["SECRET_KEY"]
# WARNING: don't run with debug turned on in production!
DEBUG = credentials.get_json("DEBUG", False)
ALLOWED_HOSTS = credentials.get_json("ALLOWED_HOSTS", [])
ADMINS = credentials.get_json("ADMINS", [])
SERVER_EMAIL = credentials.get("SERVER_EMAIL")
EMAIL_HOST = credentials.get("EMAIL_HOST")
LDAP_SERVER_URL = credentials.get("LDAP_SERVER_URL")
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
##
# Installed Apps configuration
INSTALLED_APPS = [
"gestioncof",
# Must be before django admin
# https://github.com/infoportugal/wagtail-modeltranslation/issues/193
"wagtail_modeltranslation",
"wagtail_modeltranslation.makemigrations",
"wagtail_modeltranslation.migrate",
"modeltranslation",
"shared",
# Must be before 'django.contrib.admin'.
# https://django-autocomplete-light.readthedocs.io/en/master/install.html
"dal",
"dal_select2",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.sites",
"django.contrib.messages",
"django.contrib.admin",
"django.contrib.admindocs",
"gestioasso.apps.IgnoreSrcStaticFilesConfig",
"django_cas_ng",
"bootstrapform",
"widget_tweaks",
"bda",
"petitscours",
"hcaptcha",
"kfet",
"kfet.open",
"channels",
"djconfig",
"wagtail.contrib.forms",
"wagtail.contrib.redirects",
"wagtail.embeds",
"wagtail.sites",
"wagtail.users",
"wagtail.snippets",
"wagtail.documents",
"wagtail.images",
"wagtail.search",
"wagtail.admin",
"wagtail",
# "wagtail.contrib.modeladmin",
"wagtail.contrib.routable_page",
"wagtailmenus",
"modelcluster",
"taggit",
"kfet.auth",
"kfet.cms",
"gestioncof.cms",
"django_js_reverse",
]
##
# Middleware configuration
MIDDLEWARE = [
"corsheaders.middleware.CorsMiddleware",
"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.security.SecurityMiddleware",
"django.middleware.locale.LocaleMiddleware",
"djconfig.middleware.DjConfigMiddleware",
"wagtail.contrib.redirects.middleware.RedirectMiddleware",
]
##
# URL configuration
ROOT_URLCONF = "gestioasso.urls"
##
# Templates configuration
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"wagtailmenus.context_processors.wagtailmenus",
"djconfig.context_processors.config",
"gestioncof.shared.context_processor",
"kfet.auth.context_processors.temporary_auth",
"kfet.context_processors.config",
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
"django.template.context_processors.i18n",
"django.template.context_processors.media",
"django.template.context_processors.static",
]
},
}
]
##
# Wagtail configuration
WAGTAIL_SITE_NAME = "GestioCOF"
WAGTAIL_ENABLE_UPDATE_CHECK = False
TAGGIT_CASE_INSENSITIVE = True
##
# Django-js-reverse settings
JS_REVERSE_JS_VAR_NAME = "django_urls"
# Quand on aura namespace les urls...
# JS_REVERSE_INCLUDE_ONLY_NAMESPACES = ['k-fet']
##
# K-Fêt history configuration
# L'historique n'est accesible que d'aujourd'hui
# à aujourd'hui - KFET_HISTORY_DATE_LIMIT
KFET_HISTORY_DATE_LIMIT = timedelta(days=7)
# Limite plus longue pour les chefs/trez
# (qui ont la permission kfet.access_old_history)
KFET_HISTORY_LONG_DATE_LIMIT = timedelta(days=30)
# These accounts don't represent actual people and can be freely accessed
# Identification based on trigrammes
KFET_HISTORY_NO_DATE_LIMIT_TRIGRAMMES = ["LIQ", "#13"]
KFET_HISTORY_NO_DATE_LIMIT = datetime(1794, 10, 30) # AKA the distant past
##
# Database configuration
DATABASES = credentials.get_json(
"DATABASES",
default={
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": (BASE_DIR / "db.sqlite3"),
}
},
)
CACHES = credentials.get_json(
"CACHES",
default={
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
},
},
)
CHANNEL_LAYERS = credentials.get_json(
"CHANNEL_LAYERS",
default={
"default": {
"BACKEND": "channels.layers.InMemoryChannelLayer",
}
},
)
CORS_ORIGIN_WHITELIST = credentials.get("CORS_ORIGIN_WHITELIST", [])
SITE_ID = 1
###
# Staticfiles configuration
STATIC_ROOT = credentials["STATIC_ROOT"]
STATIC_URL = "/static/"
MEDIA_ROOT = credentials.get("MEDIA_ROOT", (BASE_DIR / "media"))
MEDIA_URL = "/media/"
##
# Authentication configuration
AUTHENTICATION_BACKENDS = [
"kfet.auth.backends.BlockFrozenAccountBackend", # Must be in first
"django.contrib.auth.backends.ModelBackend",
"gestioncof.shared.COFCASBackend",
"kfet.auth.backends.GenericBackend",
]
LOGIN_URL = "cof-login"
LOGIN_REDIRECT_URL = reverse_lazy("home")
# FIXME: Switch to authens
CAS_SERVER_URL = "https://cas.eleves.ens.fr/"
CAS_VERSION = "2"
CAS_LOGIN_MSG = None
CAS_IGNORE_REFERER = True
CAS_REDIRECT_URL = "/"
CAS_EMAIL_FORMAT = "%s@clipper.ens.fr"
##
# h-captcha configuration
HCAPTCHA_SITEKEY = credentials["HCAPTCHA_SITEKEY"]
HCAPTCHA_SECRET = credentials["HCAPTCHA_SECRET"]
##
# K-Fêt token for the openness indicator
KFETOPEN_TOKEN = credentials["KFETOPEN_TOKEN"]
##
# Mail configuration
MAIL_DATA = {
"petits_cours": {
"FROM": "Le COF <cof@ens.fr>",
"BCC": "archivescof@gmail.com",
"REPLYTO": "cof@ens.fr",
},
"rappels": {
"FROM": "Le BdA <bda@ens.fr>",
"REPLYTO": "Le BdA <bda@ens.fr>",
},
"rappel_negatif": {
"FROM": "La K-Fêt <chefs-k-fet@ens.fr>",
"REPLYTO": "La K-Fêt <chefs-k-fet@ens.fr>",
},
"revente": {
"FROM": "BdA-Revente <bda-revente@ens.fr>",
"REPLYTO": "BdA-Revente <bda-revente@ens.fr>",
},
}
# ---
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
# ---
LANGUAGE_CODE = "fr-fr"
TIME_ZONE = "Europe/Paris"
USE_I18N = True
USE_L10N = True
USE_TZ = True
LANGUAGES = (("fr", "Français"), ("en", "English"))
FORMAT_MODULE_PATH = "gestioasso.locale"
##
# Development configuration
if DEBUG:
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
def show_toolbar(request):
"""
On active la debug-toolbar en mode développement local sauf :
- dans l'admin où ça ne sert pas à grand chose;
- si la variable d'environnement DJANGO_NO_DDT est à 1 → ça permet de la désactiver
sans modifier ce fichier en exécutant `export DJANGO_NO_DDT=1` dans le terminal
qui lance `./manage.py runserver`.
Autre side effect de cette fonction : on ne fait pas la vérification de INTERNAL_IPS
que ferait la debug-toolbar par défaut, ce qui la fait fonctionner aussi à
l'intérieur de Vagrant (comportement non testé depuis un moment…)
"""
env_no_ddt = bool(os.environ.get("DJANGO_NO_DDT", None))
return not (env_no_ddt or request.path.startswith("/admin/"))
##
# Django Debug Toolbar configuration
DEBUG_TOOLBAR_CONFIG = {"SHOW_TOOLBAR_CALLBACK": show_toolbar}
INSTALLED_APPS += ["debug_toolbar"]
MIDDLEWARE = ["debug_toolbar.middleware.DebugToolbarMiddleware"] + MIDDLEWARE

View file

@ -1,7 +1,6 @@
"""
Fichier principal de configuration des urls du projet GestioCOF
"""
from django.conf import settings
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
@ -59,10 +58,10 @@ if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# Wagtail URLs (wagtail urls must be last, as catch-all)
if "wagtail" in settings.INSTALLED_APPS:
from wagtail import urls as wagtail_urls
# Wagtail URLs (wagtail.core urls must be last, as catch-all)
if "wagtail.core" in settings.INSTALLED_APPS:
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.core import urls as wagtail_urls
from wagtail.documents import urls as wagtaildocs_urls
urlpatterns += [

View file

@ -3,9 +3,9 @@
from __future__ import unicode_literals
import django.db.models.deletion
import wagtail.blocks
import wagtail.contrib.routable_page.models
import wagtail.fields
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
from django.db import migrations, models
@ -72,14 +72,18 @@ class Migration(migrations.Migration):
blank=True, null=True, verbose_name="Description rapide"
),
),
("body", wagtail.fields.RichTextField(verbose_name="Contenu")),
("body", wagtail.core.fields.RichTextField(verbose_name="Contenu")),
(
"body_fr",
wagtail.fields.RichTextField(null=True, verbose_name="Contenu"),
wagtail.core.fields.RichTextField(
null=True, verbose_name="Contenu"
),
),
(
"body_en",
wagtail.fields.RichTextField(null=True, verbose_name="Contenu"),
wagtail.core.fields.RichTextField(
null=True, verbose_name="Contenu"
),
),
(
"is_event",
@ -134,40 +138,46 @@ class Migration(migrations.Migration):
to="wagtailcore.Page",
),
),
("body", wagtail.fields.RichTextField(verbose_name="Description")),
("body", wagtail.core.fields.RichTextField(verbose_name="Description")),
(
"body_fr",
wagtail.fields.RichTextField(null=True, verbose_name="Description"),
wagtail.core.fields.RichTextField(
null=True, verbose_name="Description"
),
),
(
"body_en",
wagtail.fields.RichTextField(null=True, verbose_name="Description"),
wagtail.core.fields.RichTextField(
null=True, verbose_name="Description"
),
),
(
"links",
wagtail.fields.StreamField(
wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.blocks.URLBlock(required=True),
wagtail.core.blocks.URLBlock(required=True),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.blocks.EmailBlock(required=True),
wagtail.core.blocks.EmailBlock(
required=True
),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
@ -176,29 +186,31 @@ class Migration(migrations.Migration):
),
(
"links_fr",
wagtail.fields.StreamField(
wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.blocks.URLBlock(required=True),
wagtail.core.blocks.URLBlock(required=True),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.blocks.EmailBlock(required=True),
wagtail.core.blocks.EmailBlock(
required=True
),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
@ -208,29 +220,31 @@ class Migration(migrations.Migration):
),
(
"links_en",
wagtail.fields.StreamField(
wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.blocks.URLBlock(required=True),
wagtail.core.blocks.URLBlock(required=True),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.blocks.EmailBlock(required=True),
wagtail.core.blocks.EmailBlock(
required=True
),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
@ -272,17 +286,17 @@ class Migration(migrations.Migration):
),
(
"introduction",
wagtail.fields.RichTextField(verbose_name="Introduction"),
wagtail.core.fields.RichTextField(verbose_name="Introduction"),
),
(
"introduction_fr",
wagtail.fields.RichTextField(
wagtail.core.fields.RichTextField(
null=True, verbose_name="Introduction"
),
),
(
"introduction_en",
wagtail.fields.RichTextField(
wagtail.core.fields.RichTextField(
null=True, verbose_name="Introduction"
),
),
@ -315,27 +329,27 @@ class Migration(migrations.Migration):
),
(
"body",
wagtail.fields.StreamField(
wagtail.core.fields.StreamField(
[
(
"heading",
wagtail.blocks.CharBlock(classname="full title"),
wagtail.core.blocks.CharBlock(classname="full title"),
),
("paragraph", wagtail.blocks.RichTextBlock()),
("paragraph", wagtail.core.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"iframe",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.blocks.URLBlock(
wagtail.core.blocks.URLBlock(
"Adresse de la page"
),
),
(
"height",
wagtail.blocks.CharBlock(
wagtail.core.blocks.CharBlock(
"Hauteur (en pixels)"
),
),
@ -347,27 +361,27 @@ class Migration(migrations.Migration):
),
(
"body_fr",
wagtail.fields.StreamField(
wagtail.core.fields.StreamField(
[
(
"heading",
wagtail.blocks.CharBlock(classname="full title"),
wagtail.core.blocks.CharBlock(classname="full title"),
),
("paragraph", wagtail.blocks.RichTextBlock()),
("paragraph", wagtail.core.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"iframe",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.blocks.URLBlock(
wagtail.core.blocks.URLBlock(
"Adresse de la page"
),
),
(
"height",
wagtail.blocks.CharBlock(
wagtail.core.blocks.CharBlock(
"Hauteur (en pixels)"
),
),
@ -380,27 +394,27 @@ class Migration(migrations.Migration):
),
(
"body_en",
wagtail.fields.StreamField(
wagtail.core.fields.StreamField(
[
(
"heading",
wagtail.blocks.CharBlock(classname="full title"),
wagtail.core.blocks.CharBlock(classname="full title"),
),
("paragraph", wagtail.blocks.RichTextBlock()),
("paragraph", wagtail.core.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"iframe",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.blocks.URLBlock(
wagtail.core.blocks.URLBlock(
"Adresse de la page"
),
),
(
"height",
wagtail.blocks.CharBlock(
wagtail.core.blocks.CharBlock(
"Hauteur (en pixels)"
),
),
@ -434,17 +448,17 @@ class Migration(migrations.Migration):
),
(
"introduction",
wagtail.fields.RichTextField(verbose_name="Introduction"),
wagtail.core.fields.RichTextField(verbose_name="Introduction"),
),
(
"introduction_fr",
wagtail.fields.RichTextField(
wagtail.core.fields.RichTextField(
null=True, verbose_name="Introduction"
),
),
(
"introduction_en",
wagtail.fields.RichTextField(
wagtail.core.fields.RichTextField(
null=True, verbose_name="Introduction"
),
),

View file

@ -1,7 +1,7 @@
# Generated by Django 2.2.8 on 2019-12-20 16:22
import wagtail.blocks
import wagtail.fields
import wagtail.core.blocks
import wagtail.core.fields
from django.db import migrations
@ -14,26 +14,26 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="cofdirectoryentrypage",
name="links",
field=wagtail.fields.StreamField(
field=wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
("url", wagtail.core.blocks.URLBlock(required=True)),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.blocks.EmailBlock(required=True),
wagtail.core.blocks.EmailBlock(required=True),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
@ -44,26 +44,26 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="cofdirectoryentrypage",
name="links_en",
field=wagtail.fields.StreamField(
field=wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
("url", wagtail.core.blocks.URLBlock(required=True)),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.blocks.EmailBlock(required=True),
wagtail.core.blocks.EmailBlock(required=True),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
@ -75,26 +75,26 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="cofdirectoryentrypage",
name="links_fr",
field=wagtail.fields.StreamField(
field=wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
("url", wagtail.core.blocks.URLBlock(required=True)),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.blocks.EmailBlock(required=True),
wagtail.core.blocks.EmailBlock(required=True),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),

View file

@ -1,7 +1,7 @@
# Generated by Django 2.2.15 on 2020-08-29 21:14
import wagtail.blocks
import wagtail.fields
import wagtail.core.blocks
import wagtail.core.fields
from django.db import migrations
@ -14,35 +14,35 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="cofdirectoryentrypage",
name="links",
field=wagtail.fields.StreamField(
field=wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
("url", wagtail.core.blocks.URLBlock(required=True)),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.blocks.EmailBlock(required=True),
wagtail.core.blocks.EmailBlock(required=True),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"info",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
("nom", wagtail.blocks.CharBlock(required=False)),
("texte", wagtail.blocks.CharBlock(required=True)),
("nom", wagtail.core.blocks.CharBlock(required=False)),
("texte", wagtail.core.blocks.CharBlock(required=True)),
]
),
),
@ -53,35 +53,35 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="cofdirectoryentrypage",
name="links_en",
field=wagtail.fields.StreamField(
field=wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
("url", wagtail.core.blocks.URLBlock(required=True)),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.blocks.EmailBlock(required=True),
wagtail.core.blocks.EmailBlock(required=True),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"info",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
("nom", wagtail.blocks.CharBlock(required=False)),
("texte", wagtail.blocks.CharBlock(required=True)),
("nom", wagtail.core.blocks.CharBlock(required=False)),
("texte", wagtail.core.blocks.CharBlock(required=True)),
]
),
),
@ -93,35 +93,35 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="cofdirectoryentrypage",
name="links_fr",
field=wagtail.fields.StreamField(
field=wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
("url", wagtail.core.blocks.URLBlock(required=True)),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.blocks.EmailBlock(required=True),
wagtail.core.blocks.EmailBlock(required=True),
),
("texte", wagtail.blocks.CharBlock()),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"info",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
[
("nom", wagtail.blocks.CharBlock(required=False)),
("texte", wagtail.blocks.CharBlock(required=True)),
("nom", wagtail.core.blocks.CharBlock(required=False)),
("texte", wagtail.core.blocks.CharBlock(required=True)),
]
),
),

View file

@ -1,203 +0,0 @@
# Generated by Django 4.2.17 on 2024-12-19 12:27
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("cofcms", "0004_auto_20200829_2314"),
]
operations = [
migrations.AlterField(
model_name="cofdirectoryentrypage",
name="links",
field=wagtail.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
[
("email", wagtail.blocks.EmailBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
]
),
),
(
"info",
wagtail.blocks.StructBlock(
[
("nom", wagtail.blocks.CharBlock(required=False)),
("texte", wagtail.blocks.CharBlock(required=True)),
]
),
),
],
blank=True,
use_json_field=True,
),
),
migrations.AlterField(
model_name="cofdirectoryentrypage",
name="links_en",
field=wagtail.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
[
("email", wagtail.blocks.EmailBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
]
),
),
(
"info",
wagtail.blocks.StructBlock(
[
("nom", wagtail.blocks.CharBlock(required=False)),
("texte", wagtail.blocks.CharBlock(required=True)),
]
),
),
],
blank=True,
null=True,
use_json_field=True,
),
),
migrations.AlterField(
model_name="cofdirectoryentrypage",
name="links_fr",
field=wagtail.fields.StreamField(
[
(
"lien",
wagtail.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
[
("email", wagtail.blocks.EmailBlock(required=True)),
("texte", wagtail.blocks.CharBlock()),
]
),
),
(
"info",
wagtail.blocks.StructBlock(
[
("nom", wagtail.blocks.CharBlock(required=False)),
("texte", wagtail.blocks.CharBlock(required=True)),
]
),
),
],
blank=True,
null=True,
use_json_field=True,
),
),
migrations.AlterField(
model_name="cofpage",
name="body",
field=wagtail.fields.StreamField(
[
("heading", wagtail.blocks.CharBlock(form_classname="full title")),
("paragraph", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"iframe",
wagtail.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock("Adresse de la page")),
(
"height",
wagtail.blocks.CharBlock("Hauteur (en pixels)"),
),
]
),
),
],
use_json_field=True,
),
),
migrations.AlterField(
model_name="cofpage",
name="body_en",
field=wagtail.fields.StreamField(
[
("heading", wagtail.blocks.CharBlock(form_classname="full title")),
("paragraph", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"iframe",
wagtail.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock("Adresse de la page")),
(
"height",
wagtail.blocks.CharBlock("Hauteur (en pixels)"),
),
]
),
),
],
null=True,
use_json_field=True,
),
),
migrations.AlterField(
model_name="cofpage",
name="body_fr",
field=wagtail.fields.StreamField(
[
("heading", wagtail.blocks.CharBlock(form_classname="full title")),
("paragraph", wagtail.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"iframe",
wagtail.blocks.StructBlock(
[
("url", wagtail.blocks.URLBlock("Adresse de la page")),
(
"height",
wagtail.blocks.CharBlock("Hauteur (en pixels)"),
),
]
),
),
],
null=True,
use_json_field=True,
),
),
]

View file

@ -1,11 +1,12 @@
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.db import models
from wagtail import blocks
from wagtail.admin.panels import FieldPanel
from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel
from wagtail.contrib.routable_page.models import RoutablePageMixin, route
from wagtail.fields import RichTextField, StreamField
from wagtail.core import blocks
from wagtail.core.fields import RichTextField, StreamField
from wagtail.core.models import Page
from wagtail.images.blocks import ImageChooserBlock
from wagtail.models import Page
from wagtail.images.edit_handlers import ImageChooserPanel
# Page pouvant afficher des actualités
@ -68,11 +69,10 @@ class COFPage(Page):
("paragraph", blocks.RichTextBlock()),
("image", ImageChooserBlock()),
("iframe", IFrameBlock()),
],
use_json_field=True,
]
)
content_panels = Page.content_panels + [FieldPanel("body")]
content_panels = Page.content_panels + [StreamFieldPanel("body")]
subpage_types = ["COFDirectoryPage", "COFPage"]
parent_page_types = ["COFPage", "COFRootPage"]
@ -127,7 +127,7 @@ class COFActuPage(RoutablePageMixin, Page):
all_day = models.BooleanField("Toute la journée", default=False, blank=True)
content_panels = Page.content_panels + [
FieldPanel("image"),
ImageChooserPanel("image"),
FieldPanel("chapo"),
FieldPanel("body", classname="full"),
FieldPanel("is_event"),
@ -204,7 +204,6 @@ class COFDirectoryEntryPage(Page):
),
],
blank=True,
use_json_field=True,
)
image = models.ForeignKey(
@ -217,9 +216,9 @@ class COFDirectoryEntryPage(Page):
)
content_panels = Page.content_panels + [
FieldPanel("image"),
ImageChooserPanel("image"),
FieldPanel("body", classname="full"),
FieldPanel("links"),
StreamFieldPanel("links"),
]
subpage_types = []

View file

@ -1,13 +0,0 @@
# Generated by Django 3.2.25 on 2024-12-18 21:40
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("gestioncof", "0019_auto_20220630_1241"),
("gestioncof", "0019_cofprofile_date_adhesion"),
]
operations = []

View file

@ -1,6 +1,6 @@
from django.templatetags.static import static
from django.utils.html import format_html
from wagtail import hooks
from wagtail.core import hooks
@hooks.register("insert_editor_css")

View file

@ -1,7 +1,7 @@
from django.contrib.auth.models import Group
from django.core.management import call_command
from django.core.management.base import BaseCommand
from wagtail.models import Page, Site
from wagtail.core.models import Page, Site
class Command(BaseCommand):

View file

@ -2,8 +2,8 @@
from __future__ import unicode_literals
import django.db.models.deletion
import wagtail.blocks
import wagtail.fields
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.snippets.blocks
from django.db import migrations, models
@ -41,20 +41,20 @@ class Migration(migrations.Migration):
),
(
"content",
wagtail.fields.StreamField(
wagtail.core.fields.StreamField(
(
(
"rich",
wagtail.blocks.RichTextBlock(label="Éditeur"),
wagtail.core.blocks.RichTextBlock(label="Éditeur"),
),
("carte", kfet.cms.models.MenuBlock()),
(
"group_team",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
(
(
"show_only",
wagtail.blocks.IntegerBlock(
wagtail.core.blocks.IntegerBlock(
help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.", # noqa
required=False,
label="Montrer seulement",
@ -62,7 +62,7 @@ class Migration(migrations.Migration):
),
(
"members",
wagtail.blocks.ListBlock(
wagtail.core.blocks.ListBlock(
wagtail.snippets.blocks.SnippetChooserBlock( # noqa
kfet.cms.models.MemberTeam
),
@ -75,22 +75,22 @@ class Migration(migrations.Migration):
),
(
"group",
wagtail.blocks.StreamBlock(
wagtail.core.blocks.StreamBlock(
(
(
"rich",
wagtail.blocks.RichTextBlock(
wagtail.core.blocks.RichTextBlock(
label="Éditeur"
),
),
("carte", kfet.cms.models.MenuBlock()),
(
"group_team",
wagtail.blocks.StructBlock(
wagtail.core.blocks.StructBlock(
(
(
"show_only",
wagtail.blocks.IntegerBlock( # noqa
wagtail.core.blocks.IntegerBlock( # noqa
help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.", # noqa
required=False,
label="Montrer seulement",
@ -98,7 +98,7 @@ class Migration(migrations.Migration):
),
(
"members",
wagtail.blocks.ListBlock(
wagtail.core.blocks.ListBlock(
wagtail.snippets.blocks.SnippetChooserBlock( # noqa
kfet.cms.models.MemberTeam # noqa
),

View file

@ -1,90 +0,0 @@
# Generated by Django 4.2.17 on 2024-12-19 12:27
import wagtail.blocks
import wagtail.fields
import wagtail.snippets.blocks
from django.db import migrations
import kfet.cms.models
class Migration(migrations.Migration):
dependencies = [
("kfetcms", "0002_alter_kfetpage_colcount"),
]
operations = [
migrations.AlterField(
model_name="kfetpage",
name="content",
field=wagtail.fields.StreamField(
[
("rich", wagtail.blocks.RichTextBlock(label="Éditeur")),
("carte", kfet.cms.models.MenuBlock()),
(
"group_team",
wagtail.blocks.StructBlock(
[
(
"show_only",
wagtail.blocks.IntegerBlock(
help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.",
label="Montrer seulement",
required=False,
),
),
(
"members",
wagtail.blocks.ListBlock(
wagtail.snippets.blocks.SnippetChooserBlock(
kfet.cms.models.MemberTeam
),
form_classname="team-group",
label="K-Fêt-eux-ses",
),
),
]
),
),
(
"group",
wagtail.blocks.StreamBlock(
[
("rich", wagtail.blocks.RichTextBlock(label="Éditeur")),
("carte", kfet.cms.models.MenuBlock()),
(
"group_team",
wagtail.blocks.StructBlock(
[
(
"show_only",
wagtail.blocks.IntegerBlock(
help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.",
label="Montrer seulement",
required=False,
),
),
(
"members",
wagtail.blocks.ListBlock(
wagtail.snippets.blocks.SnippetChooserBlock(
kfet.cms.models.MemberTeam
),
form_classname="team-group",
label="K-Fêt-eux-ses",
),
),
]
),
),
],
label="Contenu groupé",
),
),
],
use_json_field=True,
verbose_name="Contenu",
),
),
]

View file

@ -1,9 +1,15 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
from wagtail import blocks
from wagtail.admin.panels import FieldPanel, FieldRowPanel, MultiFieldPanel
from wagtail.fields import StreamField
from wagtail.models import Page
from wagtail.admin.edit_handlers import (
FieldPanel,
FieldRowPanel,
MultiFieldPanel,
StreamFieldPanel,
)
from wagtail.core import blocks
from wagtail.core.fields import StreamField
from wagtail.core.models import Page
from wagtail.images.edit_handlers import ImageChooserPanel
from wagtail.snippets.blocks import SnippetChooserBlock
from wagtail.snippets.models import register_snippet
@ -37,7 +43,7 @@ class MemberTeam(models.Model):
FieldPanel("first_name"),
FieldPanel("last_name"),
FieldPanel("nick_name"),
FieldPanel("photo"),
ImageChooserPanel("photo"),
]
def __str__(self):
@ -91,9 +97,7 @@ class KFetStreamBlock(ChoicesStreamBlock):
class KFetPage(Page):
content = StreamField(
KFetStreamBlock, verbose_name=_("Contenu"), use_json_field=True
)
content = StreamField(KFetStreamBlock, verbose_name=_("Contenu"))
# Layout fields
@ -131,7 +135,7 @@ class KFetPage(Page):
# Panels
content_panels = Page.content_panels + [FieldPanel("content")]
content_panels = Page.content_panels + [StreamFieldPanel("content")]
layout_panel = [
FieldPanel("no_header"),

View file

@ -93,7 +93,7 @@ class DemandeSoireeForm(forms.Form):
def default_promo():
now = date.today()
return now.month <= 7 and now.year - 1 or now.year
return now.month <= 8 and now.year - 1 or now.year
def get_promo_choices():

View file

@ -4,6 +4,7 @@ from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
@ -16,9 +17,7 @@ class Migration(migrations.Migration):
name="at",
field=models.DateTimeField(
auto_now_add=True,
default=datetime.datetime(
2016, 8, 29, 18, 35, 3, 419033, tzinfo=datetime.timezone.utc
),
default=datetime.datetime(2016, 8, 29, 18, 35, 3, 419033, tzinfo=utc),
),
preserve_default=False,
),

View file

@ -283,13 +283,9 @@ class Account(models.Model):
context={
"account": self,
"site": Site.objects.get_current(),
"url_read": reverse("kfet.account.read", args=(self.trigramme,)),
"url_update": reverse(
"kfet.account.update", args=(self.trigramme,)
),
"url_delete": reverse(
"kfet.account.delete", args=(self.trigramme,)
),
"url_read": reverse("kfet.account.read", args=(self.trigramme)),
"url_update": reverse("kfet.account.update", args=(self.trigramme)),
"url_delete": reverse("kfet.account.delete", args=(self.trigramme))
},
),
from_email=mail_data["FROM"],

View file

@ -1,81 +0,0 @@
# Generated by npins. Do not modify; will be overwritten regularly
let
data = builtins.fromJSON (builtins.readFile ./sources.json);
version = data.version;
mkSource =
spec:
assert spec ? type;
let
path =
if spec.type == "Git" then
mkGitSource spec
else if spec.type == "GitRelease" then
mkGitSource spec
else if spec.type == "PyPi" then
mkPyPiSource spec
else if spec.type == "Channel" then
mkChannelSource spec
else
builtins.throw "Unknown source type ${spec.type}";
in
spec // { outPath = path; };
mkGitSource =
{
repository,
revision,
url ? null,
hash,
branch ? null,
...
}:
assert repository ? type;
# At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository
# In the latter case, there we will always be an url to the tarball
if url != null then
(builtins.fetchTarball {
inherit url;
sha256 = hash; # FIXME: check nix version & use SRI hashes
})
else
assert repository.type == "Git";
let
urlToName =
url: rev:
let
matched = builtins.match "^.*/([^/]*)(\\.git)?$" repository.url;
short = builtins.substring 0 7 rev;
appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else "";
in
"${if matched == null then "source" else builtins.head matched}${appendShort}";
name = urlToName repository.url revision;
in
builtins.fetchGit {
url = repository.url;
rev = revision;
inherit name;
allRefs = true;
# hash = hash;
};
mkPyPiSource =
{ url, hash, ... }:
builtins.fetchurl {
inherit url;
sha256 = hash;
};
mkChannelSource =
{ url, hash, ... }:
builtins.fetchTarball {
inherit url;
sha256 = hash;
};
in
if version == 3 then
builtins.mapAttrs (_: mkSource) data.pins
else
throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`"

View file

@ -1,33 +0,0 @@
{
"pins": {
"kat-pkgs": {
"type": "Git",
"repository": {
"type": "Git",
"url": "https://git.dgnum.eu/lbailly/kat-pkgs.git"
},
"branch": "master",
"revision": "6b600b716f409c6012b424de006eac3b02148b81",
"url": null,
"hash": "0204f91vxa5qglihpfkf3j5w3k7v98wry861xf2skl024faf9idf"
},
"nix-pkgs": {
"type": "Git",
"repository": {
"type": "Git",
"url": "https://git.hubrecht.ovh/hubrecht/nix-pkgs"
},
"branch": "main",
"revision": "ac4ff5a34789ae3398aff9501735b67b6a5a285a",
"url": null,
"hash": "16n37f74p6h30hhid98vab9w5b08xqj4qcshz2kc1jh67z5n49p6"
},
"nixpkgs": {
"type": "Channel",
"name": "nixos-unstable",
"url": "https://releases.nixos.org/nixos/unstable/nixos-25.05beta719504.a73246e2eef4/nixexprs.tar.xz",
"hash": "1jjmg13jzbqxm5m5ql51n2kq1qggfyb0rhmjwhqhvqxhl350z58a"
}
},
"version": 3
}

View file

@ -2,7 +2,6 @@
set -euC
mkdir -p .static
python manage.py migrate --noinput
python manage.py sync_page_translation_fields
python manage.py update_translation_fields

View file

@ -1,5 +1,5 @@
-r requirements.txt
django-debug-toolbar==4.4.6
django-debug-toolbar==3.2.*
ipython
# Tools

View file

@ -1,15 +1,15 @@
-r requirements.txt
# Postgresql bindings
psycopg2==2.9.10
psycopg2==2.9.*
# Redis
django-redis-cache==3.0.1
redis==3.5.3
channels-redis==3.4.1
django-redis-cache==3.0.*
redis==3.5.*
channels-redis==3.4.*
# ASGI protocol and HTTP server
daphne==3.0.2
daphne==3.0.*
# ldap bindings
python-ldap

View file

@ -1,19 +1,19 @@
Django==4.2.17
Pillow==11.0.0
authens==0.2.0
channels==3.0.5
configparser==7.1.0
django-autocomplete-light==3.11.0
django-bootstrap-form==3.4
django-cas-ng==5.0.1
django-cors-headers==4.6.0
django-djconfig==0.11.0
Django==3.2.*
Pillow==7.2.0
authens==0.1b4
channels==3.0.*
configparser==3.5.0
django-autocomplete-light==3.9.4
django-bootstrap-form==3.3
django-cas-ng==4.3.*
django-cors-headers==3.13.0
django-djconfig==0.10.0
django-hCaptcha==0.2.0
django-js-reverse==0.10.2
django-widget-tweaks==1.5.0
icalendar==6.1.0
python-dateutil==2.9.0.post0
django-js-reverse==0.9.1
django-widget-tweaks==1.4.1
icalendar==4.0.7
python-dateutil==2.8.1
statistics==1.0.3.5
wagtail-modeltranslation==0.15.1
wagtail==6.3.1
wagtailmenus==4.0.1
wagtail-modeltranslation==0.11.*
wagtail==2.13.*
wagtailmenus==3.0.*

View file

@ -1,81 +1,30 @@
{
sources ? import ./npins,
pkgs ? import sources.nixpkgs { },
pkgs ? import <nixpkgs> { },
...
}:
let
nix-pkgs = import sources.nix-pkgs { inherit pkgs; };
kat-pkgs = import sources.kat-pkgs { inherit pkgs; };
python3 = pkgs.python3.override {
packageOverrides = final: prev: {
inherit (nix-pkgs)
authens
django-bootstrap-form
django-cas-ng
loadcredential
;
inherit (kat-pkgs.python3Packages)
django-djconfig
django-hCaptcha
wagtail-modeltranslation
wagtailmenus
;
};
};
python = pkgs.python39;
in
pkgs.mkShell {
shellHook = ''
if [ ! -d .static ]; then
mkdir .static
fi
export DJANGO_SETTINGS_MODULE=gestioasso.settings.local
virtualenv .venv
source .venv/bin/activate
pip install -r requirements-devel.txt | grep -v 'Requirement already satisfied:'
'';
env = {
CREDENTIALS_DIRECTORY = builtins.toString ./.credentials;
DJANGO_SETTINGS_MODULE = "gestioasso.settings.local";
GESTIOCOF_DEBUG = true;
GESTIOCOF_STATIC_ROOT = builtins.toString ./.static;
GESTIOBDS_DEBUG = true;
GESTIOBDS_STATIC_ROOT = builtins.toString ./.static;
};
packages = [
(python3.withPackages (
ps: with ps; [
django
pillow
authens
channels
configparser
django-autocomplete-light
django-bootstrap-form
django-cas-ng
django-cors-headers
django-djconfig
django-hCaptcha
django-js-reverse
django-widget-tweaks
icalendar
loadcredential
python-dateutil
statistics
wagtail-modeltranslation
wagtail
wagtailmenus
django-debug-toolbar
ipython
black
flake8
isort
]
))
pkgs.npins
];
packages =
[ python ]
++ (with python.pkgs; [
django-types
pip
virtualenv
python-ldap
]);
allowSubstitutes = false;
}