Skip to content

Commit

Permalink
Add party alt name
Browse files Browse the repository at this point in the history
  • Loading branch information
Bekabyx committed Jul 3, 2023
1 parent 76c53eb commit 35c3ad8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions wcivf/apps/parties/migrations/0020_party_alternative_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.6 on 2023-06-14 15:25

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("parties", "0019_alter_partydescription_options_and_more"),
]

operations = [
migrations.AddField(
model_name="party",
name="alternative_name",
field=models.CharField(max_length=765, null=True),
),
]
2 changes: 2 additions & 0 deletions wcivf/apps/parties/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def update_or_create_from_ynr(self, party):
"status": party["status"],
"date_registered": party["date_registered"],
"date_deregistered": party["date_deregistered"],
"alternative_name": party["alternative_name"],
}

if party["default_emblem"]:
Expand All @@ -36,6 +37,7 @@ class Party(models.Model):

party_id = models.CharField(blank=True, max_length=100, primary_key=True)
party_name = models.CharField(max_length=765)
alternative_name = models.CharField(max_length=765, null=True)
emblem_url = models.URLField(blank=True, null=True)
wikipedia_url = models.URLField(blank=True)
description = models.TextField(blank=True)
Expand Down

0 comments on commit 35c3ad8

Please sign in to comment.