diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml deleted file mode 100644 index a4d0506..0000000 --- a/.forgejo/workflows/build.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: Build and push Docker image - -on: - push: - tags: - - 'v*' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: code.edgarpierre.fr - username: ${{ vars.DOCKER_PUSH_USERNAME }} - password: ${{ secrets.DOCKER_PUSH_PASSWORD }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push - uses: docker/build-push-action@v6 - with: - push: true - tags: | - code.edgarpierre.fr/${{ github.repository }}:${{ github.ref_name }} - code.edgarpierre.fr/${{ github.repository }}:latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d6f30de..b84af83 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,4 @@ repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: check-added-large-files - - id: no-commit-to-branch - args: ["--branch", "main"] - repo: https://github.com/PyCQA/isort rev: 5.12.0 hooks: diff --git a/.python-version b/.python-version deleted file mode 100644 index e4fba21..0000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.12 diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 5af2d67..0000000 --- a/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM ghcr.io/astral-sh/uv:debian-slim - -ADD . /app -WORKDIR /app - -RUN useradd -m -r nummi && \ - chown -R nummi /app - -USER nummi - -ENV PYTHONDONTWRITEBYTECODE=1 -ENV PYTHONUNBUFFERED=1 -ENV NUMMI_CONFIG=/nummi/config.toml - -RUN uv sync --locked - -CMD ["/app/entrypoint.sh"] diff --git a/compose.yaml b/compose.yaml deleted file mode 100644 index 6a35721..0000000 --- a/compose.yaml +++ /dev/null @@ -1,23 +0,0 @@ -services: - nummi: - image: code.edgarpierre.fr/edpibu/nummi - container_name: nummi - restart: unless-stopped - ports: - - 33001:8000 - volumes: - - /docker/nummi/config:/nummi - - /docker/nummi/static:/app/static - - /docker/nummi/media:/app/media - depends_on: - - postgres - - postgres: - image: postgres:17-alpine - container_name: nummi_postgres - restart: unless-stopped - environment: - POSTGRES_USER: nummi - POSTGRES_PASSWORD: - volumes: - - /docker/nummi/postgres:/var/lib/postgresql/data \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100755 index 370a6fe..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh -cd /app/nummi -uv run manage.py collectstatic --noinput -uv run manage.py migrate --noinput -uv run gunicorn --bind :8000 --workers 2 nummi.wsgi:application \ No newline at end of file diff --git a/nummi/account/forms.py b/nummi/account/forms.py index 8dc869a..cde1416 100644 --- a/nummi/account/forms.py +++ b/nummi/account/forms.py @@ -1,4 +1,3 @@ -from django.forms.widgets import Select from main.forms import IconInput, NummiForm from .models import Account @@ -16,7 +15,3 @@ class AccountForm(NummiForm): widgets = { "icon": IconInput(), } - - -class AccountSelect(Select): - template_name = "account/forms/widgets/account.html" diff --git a/nummi/account/locale/fr_FR/LC_MESSAGES/django.mo b/nummi/account/locale/fr_FR/LC_MESSAGES/django.mo index 52b402c..d0a97cf 100644 Binary files a/nummi/account/locale/fr_FR/LC_MESSAGES/django.mo and b/nummi/account/locale/fr_FR/LC_MESSAGES/django.mo differ diff --git a/nummi/account/locale/fr_FR/LC_MESSAGES/django.po b/nummi/account/locale/fr_FR/LC_MESSAGES/django.po index 30ea931..14f7e1a 100644 --- a/nummi/account/locale/fr_FR/LC_MESSAGES/django.po +++ b/nummi/account/locale/fr_FR/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-01-04 18:51+0100\n" +"POT-Creation-Date: 2024-01-04 16:18+0100\n" "PO-Revision-Date: 2023-04-22 15:17+0200\n" "Last-Translator: Edgar P. Burkhart \n" "Language-Team: \n" @@ -17,59 +17,46 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.2.2\n" -#: .\account\models.py:12 .\account\models.py:45 .\account\models.py:53 -#: .\account\templates\account\account_list.html:9 +#: .\account\models.py:11 .\account\models.py:37 .\account\models.py:45 msgid "Account" msgstr "Compte" -#: .\account\models.py:12 +#: .\account\models.py:11 msgid "Name" msgstr "Nom" -#: .\account\models.py:16 +#: .\account\models.py:15 msgid "Icon" msgstr "Icône" -#: .\account\models.py:18 +#: .\account\models.py:17 msgid "Default" msgstr "Défaut" -#: .\account\models.py:19 -msgid "Archived" -msgstr "Archivé" - -#: .\account\models.py:46 .\account\templates\account\account_list.html:12 +#: .\account\models.py:38 msgid "Accounts" msgstr "Comptes" -#: .\account\templates\account\account_detail.html:15 +#: .\account\templates\account\account_detail.html:13 msgid "Edit account" msgstr "Modifier le compte" -#: .\account\templates\account\account_detail.html:18 +#: .\account\templates\account\account_detail.html:16 msgid "Statements" msgstr "Relevés" -#: .\account\templates\account\account_detail.html:24 +#: .\account\templates\account\account_detail.html:20 +msgid "Transactions" +msgstr "Transactions" + +#: .\account\templates\account\account_detail.html:25 msgid "History" msgstr "Historique" #: .\account\templates\account\account_form.html:5 -#: .\account\templates\account\account_table.html:35 msgid "Create account" msgstr "Créer un compte" #: .\account\templates\account\account_form.html:8 msgid "New account" msgstr "Nouveau compte" - -#: .\account\templates\account\account_table.html:16 -msgid "All accounts" -msgstr "Tous les comptes" - -#: .\account\templates\account\account_table.html:26 -msgid "Show archived" -msgstr "Afficher archivés" - -#~ msgid "Transactions" -#~ msgstr "Transactions" diff --git a/nummi/account/migrations/0004_alter_account_options.py b/nummi/account/migrations/0004_alter_account_options.py deleted file mode 100644 index 7c4fd2d..0000000 --- a/nummi/account/migrations/0004_alter_account_options.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 4.2.7 on 2025-01-04 17:44 - -from django.db import migrations - - -class Migration(migrations.Migration): - dependencies = [ - ("account", "0003_account_archived"), - ] - - operations = [ - migrations.AlterModelOptions( - name="account", - options={ - "ordering": ["-default", "archived", "name"], - "verbose_name": "Account", - "verbose_name_plural": "Accounts", - }, - ), - ] diff --git a/nummi/account/models.py b/nummi/account/models.py index c1203de..16aca17 100644 --- a/nummi/account/models.py +++ b/nummi/account/models.py @@ -4,10 +4,10 @@ from django.apps import apps from django.db import models from django.urls import reverse from django.utils.translation import gettext_lazy as _ -from main.models import NummiModel +from main.models import UserModel -class Account(NummiModel): +class Account(UserModel): id = models.UUIDField(primary_key=True, default=uuid4, editable=False) name = models.CharField(max_length=64, default=_("Account"), verbose_name=_("Name")) icon = models.SlugField( @@ -41,12 +41,12 @@ class Account(NummiModel): ) class Meta: - ordering = ["-default", "archived", "name"] + ordering = ["-default", "name"] verbose_name = _("Account") verbose_name_plural = _("Accounts") -class AccountModel(NummiModel): +class AccountModel(UserModel): account = models.ForeignKey( Account, on_delete=models.CASCADE, diff --git a/nummi/account/templates/account/account_table.html b/nummi/account/templates/account/account_table.html index f938ad1..0de11e9 100644 --- a/nummi/account/templates/account/account_table.html +++ b/nummi/account/templates/account/account_table.html @@ -1,7 +1,7 @@ {% load i18n main_extras %}
{% for acc in accounts %} -