Skip to content

Commit

Permalink
refactor: move references from abstract parentmodel to Person model
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Apr 11, 2024
1 parent 2bf0363 commit 1d47996
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions apis_ontology/migrations/0029_remove_event_references_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 4.2.10 on 2024-04-11 09:27

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('apis_ontology', '0028_delete_text'),
]

operations = [
migrations.RemoveField(
model_name='event',
name='references',
),
migrations.RemoveField(
model_name='institution',
name='references',
),
migrations.RemoveField(
model_name='place',
name='references',
),
migrations.RemoveField(
model_name='work',
name='references',
),
]
2 changes: 1 addition & 1 deletion apis_ontology/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


class LegacyStuffMixin(models.Model):
references = models.TextField(blank=True, null=True) # nur bei personen
notes = models.TextField(blank=True, null=True)

sources = GenericRelation("Source")
Expand Down Expand Up @@ -111,6 +110,7 @@ class Person(LegacyStuffMixin, LegacyDateMixin, AbstractEntity):
title = models.ManyToManyField(Title, blank=True)
gender = models.CharField(max_length=15, choices=GENDER_CHOICES, blank=True, null=True)
external_resources = models.CharField(verbose_name="Externe Verweise", blank=True, null=True)
references = models.TextField(blank=True, null=True)

#texts
# "ÖBL Haupttext"
Expand Down

0 comments on commit 1d47996

Please sign in to comment.