From 2a6bd1bcd3e98b059f87459ed79af0e8c469b90c Mon Sep 17 00:00:00 2001 From: gw3000 Date: Wed, 12 Jul 2023 18:44:23 +0200 Subject: [PATCH] sent to on sent to --- app/bird/forms.py | 8 ++++---- .../migrations/0002_alter_fallenbird_costs.py | 18 ++++++++++++++++++ app/bird/migrations/0003_fallenbird_sent_to.py | 18 ++++++++++++++++++ app/bird/models.py | 3 +++ 4 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 app/bird/migrations/0002_alter_fallenbird_costs.py create mode 100644 app/bird/migrations/0003_fallenbird_sent_to.py diff --git a/app/bird/forms.py b/app/bird/forms.py index 5f43e0a..3901b7e 100644 --- a/app/bird/forms.py +++ b/app/bird/forms.py @@ -17,10 +17,8 @@ class BirdAddForm(forms.ModelForm): class Meta: widgets = { - "date_found": DateInput( - format="%Y-%m-%d", - attrs={ - "value": date.today})} + "date_found": DateInput(format="%Y-%m-%d", attrs={"value": date.today}) + } model = FallenBird fields = [ "bird_identifier", @@ -57,6 +55,7 @@ class BirdEditForm(forms.ModelForm): "place", "status", "aviary", + "sent_to", "find_circumstances", "diagnostic_finding", "costs", @@ -67,6 +66,7 @@ class BirdEditForm(forms.ModelForm): "place": _("Fundort"), "status": _("Status"), "aviary": _("Voliere"), + "sent_to": _("Übermittelt nach"), "find_circumstances": _("Fundumstände"), "diagnostic_finding": _("Diagnose bei Fund"), "costs": _("Kosten"), diff --git a/app/bird/migrations/0002_alter_fallenbird_costs.py b/app/bird/migrations/0002_alter_fallenbird_costs.py new file mode 100644 index 0000000..8017a2c --- /dev/null +++ b/app/bird/migrations/0002_alter_fallenbird_costs.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.3 on 2023-07-12 16:15 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('bird', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='fallenbird', + name='costs', + field=models.DecimalField(decimal_places=2, default='0.00', max_digits=5, verbose_name='Kosten'), + ), + ] diff --git a/app/bird/migrations/0003_fallenbird_sent_to.py b/app/bird/migrations/0003_fallenbird_sent_to.py new file mode 100644 index 0000000..430d77a --- /dev/null +++ b/app/bird/migrations/0003_fallenbird_sent_to.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.3 on 2023-07-12 16:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('bird', '0002_alter_fallenbird_costs'), + ] + + operations = [ + migrations.AddField( + model_name='fallenbird', + name='sent_to', + field=models.CharField(blank=True, max_length=256, null=True, verbose_name='Übersandt nach'), + ), + ] diff --git a/app/bird/models.py b/app/bird/models.py index 1960cf5..31bf1e2 100644 --- a/app/bird/models.py +++ b/app/bird/models.py @@ -49,6 +49,9 @@ class FallenBird(models.Model): null=True, verbose_name=_("Voliere"), ) + sent_to = models.CharField( + max_length=256, null=True, blank=True, verbose_name=_("Übersandt nach") + ) class Meta: verbose_name = _("Patient")