mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-04-20 13:52:15 +00:00
Compare commits
10 Commits
9f8c4725ee
...
82296ed576
Author | SHA1 | Date | |
---|---|---|---|
|
82296ed576 | ||
|
ff4353d344 | ||
|
a90f45bd8b | ||
|
10c22ccc53 | ||
|
6969cee0f3 | ||
|
ddeada200b | ||
|
84e9fea15f | ||
|
b9ebb1718a | ||
|
dde1baa25c | ||
|
7a7ee47e0b |
1
.gitignore
vendored
1
.gitignore
vendored
@ -48,7 +48,6 @@ backups/
|
||||
env/
|
||||
venv/
|
||||
db.sqlite3
|
||||
shell.nix
|
||||
|
||||
# ansibles customs host
|
||||
ansible/host_vars/*.yaml
|
||||
|
@ -201,7 +201,8 @@ class Entry(models.Model):
|
||||
def save(self, *args, **kwargs):
|
||||
qs = Entry.objects.filter(~Q(pk=self.pk), activity=self.activity, note=self.note, guest=self.guest)
|
||||
if qs.exists():
|
||||
raise ValidationError(_("Already entered on ") + _("{:%Y-%m-%d %H:%M:%S}").format(qs.get().time, ))
|
||||
raise ValidationError(_("Already entered on ")
|
||||
+ _("{:%Y-%m-%d %H:%M:%S}").format(timezone.localtime(qs.get().time), ))
|
||||
|
||||
if self.guest:
|
||||
self.note = self.guest.inviter
|
||||
|
@ -55,7 +55,7 @@ class GuestTable(tables.Table):
|
||||
|
||||
def render_entry(self, record):
|
||||
if record.has_entry:
|
||||
return str(_("Entered on ") + str(_("{:%Y-%m-%d %H:%M:%S}").format(record.entry.time, )))
|
||||
return str(_("Entered on ") + str(_("{:%Y-%m-%d %H:%M:%S}").format(timezone.localtime(record.entry.time))))
|
||||
return mark_safe('<button id="{id}" class="btn btn-danger btn-sm" onclick="remove_guest(this.id)"> '
|
||||
'{delete_trans}</button>'.format(id=record.id, delete_trans=_("remove").capitalize()))
|
||||
|
||||
|
18
apps/treasury/migrations/0010_alter_invoice_bde.py
Normal file
18
apps/treasury/migrations/0010_alter_invoice_bde.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.20 on 2025-04-14 20:21
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('treasury', '0009_alter_sogecredit_transactions'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='invoice',
|
||||
name='bde',
|
||||
field=models.CharField(choices=[('Diolistos', 'Diol[list]os'), ('RavePartlist', 'RavePart[list]'), ('SecretStorlist', 'SecretStor[list]'), ('TotalistSpies', 'Tota[list]Spies'), ('Saperlistpopette', 'Saper[list]popette'), ('Finalist', 'Fina[list]'), ('Listorique', '[List]orique'), ('Satellist', 'Satel[list]'), ('Monopolist', 'Monopo[list]'), ('Kataclist', 'Katac[list]')], default='Diolistos', max_length=32, verbose_name='BDE'),
|
||||
),
|
||||
]
|
@ -27,8 +27,9 @@ class Invoice(models.Model):
|
||||
|
||||
bde = models.CharField(
|
||||
max_length=32,
|
||||
default='RavePartlist',
|
||||
default='Diolistos',
|
||||
choices=(
|
||||
('Diolistos', 'Diol[list]os'),
|
||||
('RavePartlist', 'RavePart[list]'),
|
||||
('SecretStorlist', 'SecretStor[list]'),
|
||||
('TotalistSpies', 'Tota[list]Spies'),
|
||||
|
BIN
apps/treasury/static/img/Diolistos.png
Executable file
BIN
apps/treasury/static/img/Diolistos.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 2.8 MiB |
BIN
apps/treasury/static/img/Diolistos_bg.jpg
Executable file
BIN
apps/treasury/static/img/Diolistos_bg.jpg
Executable file
Binary file not shown.
After Width: | Height: | Size: 284 KiB |
34
shell-static.nix
Executable file
34
shell-static.nix
Executable 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
23
shell.nix
Executable 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
|
||||
'';
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user