mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-07-22 00:49:11 +02:00
Compare commits
3 Commits
django-5.2
...
f6c0544842
Author | SHA1 | Date | |
---|---|---|---|
f6c0544842 | |||
dde1baa25c | |||
7a7ee47e0b |
1
.gitignore
vendored
1
.gitignore
vendored
@ -48,7 +48,6 @@ backups/
|
|||||||
env/
|
env/
|
||||||
venv/
|
venv/
|
||||||
db.sqlite3
|
db.sqlite3
|
||||||
shell.nix
|
|
||||||
|
|
||||||
# ansibles customs host
|
# ansibles customs host
|
||||||
ansible/host_vars/*.yaml
|
ansible/host_vars/*.yaml
|
||||||
|
@ -8,7 +8,7 @@ variables:
|
|||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
|
|
||||||
# Ubuntu 22.04
|
# Ubuntu 22.04
|
||||||
py310-django52:
|
py310-django42:
|
||||||
stage: test
|
stage: test
|
||||||
image: ubuntu:22.04
|
image: ubuntu:22.04
|
||||||
before_script:
|
before_script:
|
||||||
@ -22,10 +22,10 @@ py310-django52:
|
|||||||
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
||||||
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
||||||
python3-bs4 python3-setuptools tox texlive-xetex
|
python3-bs4 python3-setuptools tox texlive-xetex
|
||||||
script: tox -e py310-django52
|
script: tox -e py310-django42
|
||||||
|
|
||||||
# Debian Bookworm
|
# Debian Bookworm
|
||||||
py311-django52:
|
py311-django42:
|
||||||
stage: test
|
stage: test
|
||||||
image: debian:bookworm
|
image: debian:bookworm
|
||||||
before_script:
|
before_script:
|
||||||
@ -37,7 +37,7 @@ py311-django52:
|
|||||||
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
||||||
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
||||||
python3-bs4 python3-setuptools tox texlive-xetex
|
python3-bs4 python3-setuptools tox texlive-xetex
|
||||||
script: tox -e py311-django52
|
script: tox -e py311-django42
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
stage: quality-assurance
|
stage: quality-assurance
|
||||||
|
@ -44,7 +44,7 @@ class TemplateLoggedInTests(TestCase):
|
|||||||
self.assertRedirects(response, settings.LOGIN_REDIRECT_URL, 302, 302)
|
self.assertRedirects(response, settings.LOGIN_REDIRECT_URL, 302, 302)
|
||||||
|
|
||||||
def test_logout(self):
|
def test_logout(self):
|
||||||
response = self.client.post(reverse("logout"))
|
response = self.client.get(reverse("logout"))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
def test_admin_index(self):
|
def test_admin_index(self):
|
||||||
|
@ -13,7 +13,7 @@ def register_note_urls(router, path):
|
|||||||
router.register(path + '/note', NotePolymorphicViewSet)
|
router.register(path + '/note', NotePolymorphicViewSet)
|
||||||
router.register(path + '/alias', AliasViewSet)
|
router.register(path + '/alias', AliasViewSet)
|
||||||
router.register(path + '/trust', TrustViewSet)
|
router.register(path + '/trust', TrustViewSet)
|
||||||
router.register(path + '/consumer', ConsumerViewSet, basename='alias2')
|
router.register(path + '/consumer', ConsumerViewSet)
|
||||||
|
|
||||||
router.register(path + '/transaction/category', TemplateCategoryViewSet)
|
router.register(path + '/transaction/category', TemplateCategoryViewSet)
|
||||||
router.register(path + '/transaction/transaction', TransactionViewSet)
|
router.register(path + '/transaction/transaction', TransactionViewSet)
|
||||||
|
@ -39,7 +39,6 @@ SECURE_HSTS_PRELOAD = True
|
|||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
# External apps
|
# External apps
|
||||||
'bootstrap_datepicker_plus',
|
'bootstrap_datepicker_plus',
|
||||||
'cas_server',
|
|
||||||
'colorfield',
|
'colorfield',
|
||||||
'crispy_bootstrap4',
|
'crispy_bootstrap4',
|
||||||
'crispy_forms',
|
'crispy_forms',
|
||||||
|
@ -138,12 +138,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
<a class="dropdown-item" href="{% url 'member:user_detail' pk=request.user.pk %}">
|
<a class="dropdown-item" href="{% url 'member:user_detail' pk=request.user.pk %}">
|
||||||
<i class="fa fa-user"></i> {% trans "My account" %}
|
<i class="fa fa-user"></i> {% trans "My account" %}
|
||||||
</a>
|
</a>
|
||||||
<form method="post" action="{% url 'logout' %}">
|
<a class="dropdown-item" href="{% url 'logout' %}">
|
||||||
{% csrf_token %}
|
<i class="fa fa-sign-out"></i> {% trans "Log out" %}
|
||||||
<button class="dropdown-item" type=submit">
|
</a>
|
||||||
<i class="fa fa-sign-out"></i> {% trans "Log out" %}
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
beautifulsoup4~=4.13.4
|
beautifulsoup4~=4.12.3
|
||||||
crispy-bootstrap4~=2025.6
|
crispy-bootstrap4~=2023.1
|
||||||
Django~=5.2.4
|
Django~=4.2.9
|
||||||
django-bootstrap-datepicker-plus~=5.0.5
|
django-bootstrap-datepicker-plus~=5.0.5
|
||||||
django-cas-server~=3.1.0
|
#django-cas-server~=2.0.0
|
||||||
django-colorfield~=0.14.0
|
django-colorfield~=0.11.0
|
||||||
django-crispy-forms~=2.4.0
|
django-crispy-forms~=2.1.0
|
||||||
django-extensions>=4.1.0
|
django-extensions>=3.2.3
|
||||||
django-filter~=25.1
|
django-filter~=23.5
|
||||||
#django-htcpcp-tea~=0.8.1
|
#django-htcpcp-tea~=0.8.1
|
||||||
django-mailer~=2.3.2
|
django-mailer~=2.3.1
|
||||||
django-oauth-toolkit~=3.0.1
|
django-oauth-toolkit~=2.3.0
|
||||||
django-phonenumber-field~=8.1.0
|
django-phonenumber-field~=7.3.0
|
||||||
django-polymorphic~=3.1.0
|
django-polymorphic~=3.1.0
|
||||||
djangorestframework~=3.16.0
|
djangorestframework~=3.14.0
|
||||||
django-rest-polymorphic~=0.1.10
|
django-rest-polymorphic~=0.1.10
|
||||||
django-tables2~=2.7.5
|
django-tables2~=2.7.0
|
||||||
python-memcached~=1.62
|
python-memcached~=1.62
|
||||||
phonenumbers~=9.0.8
|
phonenumbers~=8.13.28
|
||||||
Pillow>=11.3.0
|
Pillow>=10.2.0
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
}
|
6
tox.ini
6
tox.ini
@ -1,13 +1,13 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
# Ubuntu 22.04 Python
|
# Ubuntu 22.04 Python
|
||||||
py310-django52
|
py310-django42
|
||||||
|
|
||||||
# Debian Bookworm Python
|
# Debian Bookworm Python
|
||||||
py311-django52
|
py311-django42
|
||||||
|
|
||||||
# Ubuntu 24.04 Python
|
# Ubuntu 24.04 Python
|
||||||
py312-django52
|
py312-django42
|
||||||
|
|
||||||
linters
|
linters
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
Reference in New Issue
Block a user