From f6b5153d92d5c8e2af8de61b692a8a182694beb8 Mon Sep 17 00:00:00 2001 From: Kristoffer Rath Hansen Date: Sat, 31 Aug 2024 13:39:32 +0200 Subject: [PATCH] =?UTF-8?q?=C3=86ndre=20feltnavn=20fra=20union=5Femail=20t?= =?UTF-8?q?il=20email=20-=20nemmere=20udvikling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- members/admin/union_admin.py | 4 ++-- .../0055_rename_union_email_union_email.py | 18 ++++++++++++++++++ members/models/union.py | 2 +- members/tests/factories/union_factory.py | 2 +- 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 members/migrations/0055_rename_union_email_union_email.py diff --git a/members/admin/union_admin.py b/members/admin/union_admin.py index 0e7a9fee..186d8fc9 100644 --- a/members/admin/union_admin.py +++ b/members/admin/union_admin.py @@ -83,7 +83,7 @@ class UnionAdmin(admin.ModelAdmin): list_display = ( "union_link", "address", - "union_email", + "email", "founded_at", "closed_at", "waitinglist_count_link", @@ -124,7 +124,7 @@ def get_queryset(self, request): ( "Navn og Adresse", { - "fields": ("name", "union_email", "address"), + "fields": ("name", "email", "address"), "description": "

Udfyld navnet på foreningen (f.eks København, \ vestjylland) og adressen

", }, diff --git a/members/migrations/0055_rename_union_email_union_email.py b/members/migrations/0055_rename_union_email_union_email.py new file mode 100644 index 00000000..1d2b70b3 --- /dev/null +++ b/members/migrations/0055_rename_union_email_union_email.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.11 on 2024-08-31 11:39 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("members", "0054_merge_20240617_2150"), + ] + + operations = [ + migrations.RenameField( + model_name="union", + old_name="union_email", + new_name="email", + ), + ] diff --git a/members/models/union.py b/members/models/union.py index f7c8eefa..76c76568 100644 --- a/members/models/union.py +++ b/members/models/union.py @@ -55,7 +55,7 @@ class Meta: ) secretary_old = models.CharField("Sekretær", max_length=200, blank=True) secretary_email_old = models.EmailField("Sekretærens email", blank=True) - union_email = models.EmailField("Foreningens email", blank=True) + email = models.EmailField("Foreningens email", blank=True) statues = models.URLField("Link til gældende vedtægter", blank=True) founded_at = models.DateField("Stiftet", blank=True, null=True) closed_at = models.DateField( diff --git a/members/tests/factories/union_factory.py b/members/tests/factories/union_factory.py index fd84104e..372dbfe3 100644 --- a/members/tests/factories/union_factory.py +++ b/members/tests/factories/union_factory.py @@ -19,7 +19,7 @@ class Meta: cashier_email_old = Faker("email") secretary_old = Faker("name") secretary_email_old = Faker("email") - union_email = Faker("email") + email = Faker("email") statues = Faker("url") founded_at = Faker("date_time", tzinfo=TIMEZONE) closed_at = Faker("date_time", tzinfo=TIMEZONE)