diff --git a/argocd/configmap.yaml b/argocd/configmap.yaml index fba99f0..953c3b4 100644 --- a/argocd/configmap.yaml +++ b/argocd/configmap.yaml @@ -18,7 +18,7 @@ data: MEDIA_URL: "/media/" # Application Version - VERSION: "0.989" + VERSION: "0.990" # Database Configuration (for future use) # DATABASE_ENGINE: "django.db.backends.sqlite3" diff --git a/argocd/deployment.yaml b/argocd/deployment.yaml index 4bc74a8..8e335b3 100644 --- a/argocd/deployment.yaml +++ b/argocd/deployment.yaml @@ -27,7 +27,7 @@ spec: mountPath: /data containers: - name: web - image: git.baumann.gr/adebaumann/vui:0.989 + image: git.baumann.gr/adebaumann/vui:0.990 imagePullPolicy: Always securityContext: runAsUser: 99 diff --git a/dokumente/admin.py b/dokumente/admin.py index 8191315..94fcfd3 100644 --- a/dokumente/admin.py +++ b/dokumente/admin.py @@ -2,11 +2,9 @@ from django.contrib import admin from django import forms from django.utils.safestring import mark_safe -from mptt.forms import TreeNodeMultipleChoiceField from nested_admin import NestedStackedInline, NestedModelAdmin, NestedTabularInline from .models import * from stichworte.models import Stichwort, Stichworterklaerung -from referenzen.models import Referenz @@ -87,12 +85,10 @@ class EinleitungInline(NestedStackedInline): ) class VorgabeForm(forms.ModelForm): - referenzen = TreeNodeMultipleChoiceField(queryset=Referenz.objects.all(), required=False) - class Meta: model = Vorgabe fields = '__all__' - + def clean_thema(self): """Validate that thema is provided.""" thema = self.cleaned_data.get('thema') diff --git a/referenzen/admin.py b/referenzen/admin.py index f42fb05..5b776b7 100644 --- a/referenzen/admin.py +++ b/referenzen/admin.py @@ -14,7 +14,7 @@ class ReferenzerklaerungInline(NestedStackedInline): class ReferenzAdmin(NestedModelAdmin): list_display = ('Path', 'vorgaben_count') inlines=[ReferenzerklaerungInline] - search_fields=("name_nummer","Path") + search_fields=("name_nummer","name_text") readonly_fields=("vorgaben_list",) fieldsets = ( (None, { diff --git a/referenzen/models.py b/referenzen/models.py index 477caff..6ac338c 100644 --- a/referenzen/models.py +++ b/referenzen/models.py @@ -13,15 +13,17 @@ class Referenz(MPTTModel): url = models.URLField(blank=True) def Path(self): - Temp = " → ".join([str(x) for x in self.get_ancestors(include_self=True)])+(" (%s)"%self.name_text if self.name_text else "") - return Temp + path = " → ".join([x.name_nummer for x in self.get_ancestors(include_self=True)]) + if self.name_text: + path += " (%s)" % self.name_text + return path class MPTTMeta: parent_attr = 'oberreferenz' # optional, but safe order_insertion_by = ['name_nummer'] def __str__(self): - return self.name_nummer + return self.Path() class Meta: verbose_name_plural="Referenzen" diff --git a/rollen/migrations/0003_alter_rolle_options.py b/rollen/migrations/0003_alter_rolle_options.py new file mode 100644 index 0000000..091c79c --- /dev/null +++ b/rollen/migrations/0003_alter_rolle_options.py @@ -0,0 +1,17 @@ +# Generated by Django 6.0.1 on 2026-02-12 13:27 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('rollen', '0002_alter_rolle_options'), + ] + + operations = [ + migrations.AlterModelOptions( + name='rolle', + options={'verbose_name': 'Rolle', 'verbose_name_plural': 'Rollen'}, + ), + ]