mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-12-02 13:16:54 +00:00
Compare commits
12 Commits
7e3c02992b
...
432ecb008d
Author | SHA1 | Date | |
---|---|---|---|
|
432ecb008d | ||
|
201d6b114a | ||
|
19e77df299 | ||
|
5fd6ec5668 | ||
|
10a01c5bc2 | ||
|
989905ea64 | ||
|
0218d43a17 | ||
|
5d30b0e819 | ||
|
ec759dd3c0 | ||
|
2eb965291d | ||
|
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
|
||||
|
@ -8,19 +8,19 @@ variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
|
||||
# Debian Buster
|
||||
py37-django22:
|
||||
stage: test
|
||||
image: debian:buster-backports
|
||||
before_script:
|
||||
- >
|
||||
apt-get update &&
|
||||
apt-get install --no-install-recommends -t buster-backports -y
|
||||
python3-django python3-django-crispy-forms
|
||||
python3-django-extensions python3-django-filters python3-django-polymorphic
|
||||
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
||||
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
||||
python3-bs4 python3-setuptools tox texlive-xetex
|
||||
script: tox -e py37-django22
|
||||
# py37-django22:
|
||||
# stage: test
|
||||
# image: debian:buster-backports
|
||||
# before_script:
|
||||
# - >
|
||||
# apt-get update &&
|
||||
# apt-get install --no-install-recommends -t buster-backports -y
|
||||
# python3-django python3-django-crispy-forms
|
||||
# python3-django-extensions python3-django-filters python3-django-polymorphic
|
||||
# python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
||||
# python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
||||
# python3-bs4 python3-setuptools tox texlive-xetex
|
||||
# script: tox -e py37-django22
|
||||
|
||||
# Ubuntu 20.04
|
||||
py38-django22:
|
||||
@ -56,7 +56,7 @@ py39-django22:
|
||||
|
||||
linters:
|
||||
stage: quality-assurance
|
||||
image: debian:buster-backports
|
||||
image: debian:bullseye
|
||||
before_script:
|
||||
- apt-get update && apt-get install -y tox
|
||||
script: tox -e linters
|
||||
|
@ -17,6 +17,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
var date_end = document.getElementById("id_date_end");
|
||||
var date_start = document.getElementById("id_date_start");
|
||||
|
@ -26,7 +26,7 @@ from permission.backends import PermissionBackend
|
||||
from permission.models import Role
|
||||
from permission.views import ProtectQuerysetMixin, ProtectedCreateView
|
||||
|
||||
from .forms import UserForm, ProfileForm, ImageForm, ClubForm, MembershipForm,\
|
||||
from .forms import UserForm, ProfileForm, ImageForm, ClubForm, MembershipForm, \
|
||||
CustomAuthenticationForm, MembershipRolesForm
|
||||
from .models import Club, Membership
|
||||
from .tables import ClubTable, UserTable, MembershipTable, ClubManagerTable
|
||||
|
@ -13,7 +13,7 @@ from rest_framework import status
|
||||
from api.viewsets import ReadProtectedModelViewSet, ReadOnlyProtectedModelViewSet
|
||||
from permission.backends import PermissionBackend
|
||||
|
||||
from .serializers import NotePolymorphicSerializer, AliasSerializer, ConsumerSerializer,\
|
||||
from .serializers import NotePolymorphicSerializer, AliasSerializer, ConsumerSerializer, \
|
||||
TemplateCategorySerializer, TransactionTemplateSerializer, TransactionPolymorphicSerializer, \
|
||||
TrustSerializer
|
||||
from ..models.notes import Note, Alias, NoteUser, NoteClub, NoteSpecial, Trust
|
||||
|
@ -10,7 +10,7 @@ from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
from permission.models import Role
|
||||
|
||||
from ..api.views import AliasViewSet, ConsumerViewSet, NotePolymorphicViewSet, TemplateCategoryViewSet,\
|
||||
from ..api.views import AliasViewSet, ConsumerViewSet, NotePolymorphicViewSet, TemplateCategoryViewSet, \
|
||||
TransactionTemplateViewSet, TransactionViewSet
|
||||
from ..models import NoteUser, Transaction, TemplateCategory, TransactionTemplate, RecurrentTransaction, \
|
||||
MembershipTransaction, SpecialTransaction, NoteSpecial, Alias, Note
|
||||
|
@ -5,7 +5,7 @@ from django_filters.rest_framework import DjangoFilterBackend
|
||||
from rest_framework.filters import SearchFilter
|
||||
from api.viewsets import ReadProtectedModelViewSet
|
||||
|
||||
from .serializers import InvoiceSerializer, ProductSerializer, RemittanceTypeSerializer, RemittanceSerializer,\
|
||||
from .serializers import InvoiceSerializer, ProductSerializer, RemittanceTypeSerializer, RemittanceSerializer, \
|
||||
SogeCreditSerializer
|
||||
from ..models import Invoice, Product, RemittanceType, Remittance, SogeCredit
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
from django.urls import path
|
||||
|
||||
from .views import InvoiceCreateView, InvoiceListView, InvoiceUpdateView, InvoiceDeleteView, InvoiceRenderView,\
|
||||
RemittanceListView, RemittanceCreateView, RemittanceUpdateView, LinkTransactionToRemittanceView,\
|
||||
from .views import InvoiceCreateView, InvoiceListView, InvoiceUpdateView, InvoiceDeleteView, InvoiceRenderView, \
|
||||
RemittanceListView, RemittanceCreateView, RemittanceUpdateView, LinkTransactionToRemittanceView, \
|
||||
UnlinkTransactionToRemittanceView, SogeCreditListView, SogeCreditManageView
|
||||
|
||||
app_name = 'treasury'
|
||||
|
@ -3388,6 +3388,10 @@ msgstr "Support technique"
|
||||
msgid "FAQ (FR)"
|
||||
msgstr "FAQ (FR)"
|
||||
|
||||
#: note_kfet/templates/base.html:200
|
||||
msgid "Charte Info (FR)"
|
||||
msgstr "Charte Info (FR)"
|
||||
|
||||
#: note_kfet/templates/base_search.html:15
|
||||
msgid "Search by attribute such as name…"
|
||||
msgstr "Chercher par un attribut tel que le nom …"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"domain": "note.crans.org",
|
||||
"name": "La Note Kfet \ud83c\udf7b"
|
||||
"name": "La Note Kfet 🍪"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -194,6 +194,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
class="text-muted">{% trans "Contact us" %}</a> —
|
||||
<a href="mailto:{{ "SUPPORT_EMAIL" | getenv }}"
|
||||
class="text-muted">{% trans "Technical Support" %}</a> —
|
||||
<a href="https://perso.crans.org/club-bde/charte_informatique.pdf"
|
||||
class="text-muted">{% trans "Charte Info (FR)" %}</a> —
|
||||
<a href="https://note.crans.org/doc/faq/"
|
||||
class="text-muted">{% trans "FAQ (FR)" %}</a> —
|
||||
</span>
|
||||
|
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…
Reference in New Issue
Block a user