From 49fd68327eee961b167b0dbbb80e99d6295afe10 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 9 Feb 2024 12:03:03 +0100 Subject: [PATCH] Add pz field --- src/pz/admin.py | 1 + .../migrations/0014_directdebit_nosignature.py | 18 ++++++++++++++++++ src/pz/models.py | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 src/pz/migrations/0014_directdebit_nosignature.py diff --git a/src/pz/admin.py b/src/pz/admin.py index daacdce15..1bbb1da6d 100644 --- a/src/pz/admin.py +++ b/src/pz/admin.py @@ -117,6 +117,7 @@ class DirectDebitAdmin(admin.ModelAdmin): fieldsets = [ (None, { "fields": [ + 'nosignature', ('first_name', 'sex', 'date_of_birth'), 'last_name', ('street', 'building'), diff --git a/src/pz/migrations/0014_directdebit_nosignature.py b/src/pz/migrations/0014_directdebit_nosignature.py new file mode 100644 index 000000000..6f6c699dc --- /dev/null +++ b/src/pz/migrations/0014_directdebit_nosignature.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.8 on 2024-02-05 12:56 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pz', '0013_alter_campaign_options_alter_directdebit_options_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='directdebit', + name='nosignature', + field=models.BooleanField(default=False, verbose_name='Bez podpisu'), + ), + ] diff --git a/src/pz/models.py b/src/pz/models.py index 6bf77ad5a..05dead2e8 100644 --- a/src/pz/models.py +++ b/src/pz/models.py @@ -78,6 +78,8 @@ class DirectDebit(models.Model): campaign = models.ForeignKey(Campaign, models.PROTECT, null=True, blank=True, verbose_name='kampania') latest_status = models.CharField(max_length=255, blank=True) + + nosignature = models.BooleanField('Bez podpisu', default=False) class Meta: verbose_name = 'polecenie zapłaty' -- 2.20.1