1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 18:08:21 +02:00

Compare commits

...

21 Commits

Author SHA1 Message Date
9c519e517f Merge branch 'nix-shell' into 'main'
Nix shell

See merge request bde/nk20!201
2025-03-09 17:44:05 +01:00
3ccb31639c Merge branch 'perm_gc_anti_vss' into 'main'
improve permissions for GC anti-VSS

See merge request bde/nk20!290
2025-03-09 13:28:55 +01:00
5fb12a1388 improve permissions for GC anti-VSS 2025-03-09 13:11:46 +01:00
fe029893b0 Merge branch 'permissions_fo_parent_clubs' into 'main'
Permissions fo parent clubs

See merge request bde/nk20!289
2025-03-08 22:29:07 +01:00
767e98c2a3 Update file initial.json 2025-03-08 22:05:22 +01:00
1bdad76fe9 Update file initial.json 2025-03-08 22:00:46 +01:00
0196db7fff Update file initial.json 2025-03-08 21:54:28 +01:00
1f53ad4407 Update file initial.json 2025-03-08 21:47:21 +01:00
018f6e3f13 Update file initial.json 2025-03-08 21:37:53 +01:00
9752a030d9 Update file initial.json 2025-03-08 21:30:25 +01:00
b27bdb090d Update file initial.json 2025-03-08 21:30:16 +01:00
55a0fbb6cb Update file initial.json 2025-03-08 21:15:56 +01:00
c356534309 Update file initial.json 2025-03-08 20:25:33 +01:00
51315a0555 Update file initial.json 2025-03-08 20:25:16 +01:00
e5f9fe2cf5 Update file initial.json 2025-03-08 20:00:20 +01:00
c630a3fbd5 Merge branch 'change_template' into 'main'
Change template

See merge request bde/nk20!288
2025-03-07 19:25:27 +01:00
79b8ebeca4 Merge branch 'main' into change_template 2025-03-07 19:09:17 +01:00
dc14ba0101 Suppression article TVA 2025-03-07 18:42:41 +01:00
6028bfeb56 Merge branch 'notekfet_wrapped' into 'main'
Notekfet wrapped

See merge request bde/nk20!287
2025-03-05 22:03:51 +01:00
dde1baa25c typo 2022-08-21 19:50:53 +02:00
7a7ee47e0b Add two shell.nix to enable easier development on nixos. 2022-08-21 19:46:11 +02:00
5 changed files with 158 additions and 9 deletions

1
.gitignore vendored
View File

@ -48,7 +48,6 @@ backups/
env/
venv/
db.sqlite3
shell.nix
# ansibles customs host
ansible/host_vars/*.yaml

View File

@ -3938,7 +3938,7 @@
],
"query": "{\"activity__organizer\": [\"club\"]}",
"type": "delete",
"mask": 1,
"mask": 2,
"field": "",
"permanent": false,
"description": "Supprimer des personnes invitées aux événements organisés par son club"
@ -4088,6 +4088,102 @@
"description": "Modifier la visibilité des wrapped de son club"
}
},
{
"model": "permission.permission",
"pk": 260,
"fields": {
"model": [
"member",
"club"
],
"query": "{\"parent_club\": [\"club\"]}",
"type": "view",
"mask": 2,
"field": "",
"permanent": false,
"description": "Voir les informations d'un club enfant"
}
},
{
"model": "permission.permission",
"pk": 261,
"fields": {
"model": [
"member",
"club"
],
"query": "{\"parent_club\": [\"club\"]}",
"type": "change",
"mask": 2,
"field": "",
"permanent": false,
"description": "Modifier un club enfant"
}
},
{
"model": "permission.permission",
"pk": 262,
"fields": {
"model": [
"member",
"membership"
],
"query": "{\"club__parent_club\": [\"club\"]}",
"type": "add",
"mask": 2,
"field": "",
"permanent": false,
"description": "Ajouter un⋅e membre à un club enfant"
}
},
{
"model": "permission.permission",
"pk": 263,
"fields": {
"model": [
"member",
"membership"
],
"query": "{\"club__parent_club\": [\"club\"]}",
"type": "view",
"mask": 3,
"field": "",
"permanent": false,
"description": "Voir les adhérent⋅es du club enfant"
}
},
{
"model": "permission.permission",
"pk": 264,
"fields": {
"model": [
"note",
"transaction"
],
"query": "[\"OR\", {\"source__noteclub__club__parent_club\": [\"club\"]}, {\"destination__noteclub__club__parent_club\": [\"club\"]}]",
"type": "view",
"mask": 2,
"field": "",
"permanent": false,
"description": "Voir les transactions d'un club enfant"
}
},
{
"model": "permission.permission",
"pk": 265,
"fields": {
"model": [
"note",
"note"
],
"query": "{\"noteclub__club__parent_club\": [\"club\"]}",
"type": "view",
"mask": 2,
"field": "",
"permanent": false,
"description": "Voir la note d'un club enfant"
}
},
{
"model": "permission.role",
"pk": 1,
@ -4646,10 +4742,11 @@
"for_club": 1,
"name": "GC anti-VSS",
"permissions": [
150,
42,
135,
150,
163,
164,
182
164
]
}
},

View File

@ -183,10 +183,6 @@ Facture n°\FactureNum
}
\begin{center}
TVA non applicable, article 293 B du CGI.
\end{center}
\end{document}
{% endlanguage %}

34
shell-static.nix Executable file
View File

@ -0,0 +1,34 @@
# This is a workaround meant for use with the nix package manager. If you don't know what it is or don't use it, please ignore this file.
#
# The nk20 javascript static location are hardcoded for imperative system.
# This make ./manage.py collectstatic hard to use with nixos.
#
# A workaround is to enter a FHSUserEnv with the static placed under /share/javascript/<static>.
# This emulate a debian like system and enable collecting static normally with ./manage.py collectstatics.
# The regular shell.nix should be enough for other configurations.
#
# Warning, you are still supposed to use pip package with a venv !
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "pipzone";
targetPkgs = pkgs: (with pkgs;
let
fhs-static = stdenv.mkDerivation {
name = "fhs-static";
buildCommand = ''
mkdir -p $out/share/javascript/bootstrap4
mkdir -p $out/share/javascript/jquery
ln -s ${python39Packages.xstatic-bootstrap}/lib/python3.9/site-packages/xstatic/pkg/bootstrap/data/* $out/share/javascript/bootstrap4
ln -s ${python39Packages.xstatic-jquery}/lib/python3.9/site-packages/xstatic/pkg/jquery/data/* $out/share/javascript/jquery
'';
};
in [
fhs-static
python39
gettext
python39Packages.pip
python39Packages.virtualenv
python39Packages.setuptools
]);
runScript = "bash";
}).env

23
shell.nix Executable file
View File

@ -0,0 +1,23 @@
# This is meant for use with the nix package manager. If you don't know what it is or don't use it, please ignore this file.
#
# This shell.nix contains all dependencies require to create a venv and pip install -r requirements.txt.
#
# Please check shell-static.nix for running ./manage.py collectstatics.
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
python39
python39Packages.pip
python39Packages.setuptools
gettext
];
shellHook = ''
# Tells pip to put packages into $PIP_PREFIX instead of the usual locations.
# See https://pip.pypa.io/en/stable/user_guide/#environment-variables.
export PIP_PREFIX=$(pwd)/_build/pip_packages
export PYTHONPATH="$PIP_PREFIX/${pkgs.python39.sitePackages}:$PYTHONPATH"
export PATH="$PIP_PREFIX/bin:$PATH"
unset SOURCE_DATE_EPOCH
'';
}