Skip to content

Commit

Permalink
Add controlled vocab field to subject in relations
Browse files Browse the repository at this point in the history
  • Loading branch information
gythaogg committed Jul 2, 2024
1 parent c410fd2 commit 1223075
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Generated by Django 4.2.13 on 2024-07-02 20:03

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("apis_ontology", "0020_alter_work_subject_vocab"),
]

operations = [
migrations.AddField(
model_name="persondirectpredecessorinlineageofperson",
name="subject_of_teaching_vocab",
field=models.ManyToManyField(
blank=True,
to="apis_ontology.subject",
verbose_name="Subject of teaching",
),
),
migrations.AddField(
model_name="persondiscipleofperson",
name="subject_of_teaching_vocab",
field=models.ManyToManyField(
blank=True,
to="apis_ontology.subject",
verbose_name="Subject of teaching",
),
),
migrations.AddField(
model_name="personreferswithnametotheviewsofperson",
name="subject_of_teaching_vocab",
field=models.ManyToManyField(
blank=True,
to="apis_ontology.subject",
verbose_name="Subject of teaching",
),
),
migrations.AddField(
model_name="personreferswithoutnametotheviewsofperson",
name="subject_of_teaching_vocab",
field=models.ManyToManyField(
blank=True,
to="apis_ontology.subject",
verbose_name="Subject of teaching",
),
),
migrations.AddField(
model_name="personrequestorofperson",
name="subject_of_teaching_vocab",
field=models.ManyToManyField(
blank=True,
to="apis_ontology.subject",
verbose_name="Subject of teaching",
),
),
migrations.AlterField(
model_name="persondirectpredecessorinlineageofperson",
name="subject_of_teaching",
field=models.CharField(
blank=True,
editable=False,
max_length=255,
null=True,
verbose_name="subject of teaching",
),
),
migrations.AlterField(
model_name="persondiscipleofperson",
name="subject_of_teaching",
field=models.CharField(
blank=True,
editable=False,
max_length=255,
null=True,
verbose_name="subject of teaching",
),
),
migrations.AlterField(
model_name="personreferswithnametotheviewsofperson",
name="subject_of_teaching",
field=models.CharField(
blank=True,
editable=False,
max_length=255,
null=True,
verbose_name="subject of teaching",
),
),
migrations.AlterField(
model_name="personreferswithoutnametotheviewsofperson",
name="subject_of_teaching",
field=models.CharField(
blank=True,
editable=False,
max_length=255,
null=True,
verbose_name="subject of teaching",
),
),
migrations.AlterField(
model_name="personstudentofperson",
name="subject_of_teaching",
field=models.CharField(
blank=True,
editable=False,
max_length=255,
null=True,
verbose_name="subject of teaching",
),
),
]
20 changes: 20 additions & 0 deletions apis_ontology/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,12 @@ class PersonDirectPredecessorInLineageOfPerson(TibScholRelationMixin):
blank=True,
null=True,
verbose_name="subject of teaching",
editable=False,
)
)
subject_of_teaching_vocab = models.ManyToManyField(
Subject, verbose_name="Subject of teaching", blank=True
)


class PersonDiscipleOfPerson(TibScholRelationMixin):
Expand All @@ -517,8 +521,12 @@ class PersonDiscipleOfPerson(TibScholRelationMixin):
blank=True,
null=True,
verbose_name="subject of teaching",
editable=False,
)
)
subject_of_teaching_vocab = models.ManyToManyField(
Subject, verbose_name="Subject of teaching", blank=True
)


class PersonEditorOfInstance(TibScholRelationMixin):
Expand Down Expand Up @@ -714,8 +722,12 @@ class PersonRefersWithNameToTheViewsOfPerson(TibScholRelationMixin):
blank=True,
null=True,
verbose_name="subject of teaching",
editable=False,
)
)
subject_of_teaching_vocab = models.ManyToManyField(
Subject, verbose_name="Subject of teaching", blank=True
)


class PersonRefersWithoutNameToTheViewsOfPerson(TibScholRelationMixin):
Expand All @@ -731,8 +743,12 @@ class PersonRefersWithoutNameToTheViewsOfPerson(TibScholRelationMixin):
blank=True,
null=True,
verbose_name="subject of teaching",
editable=False,
)
)
subject_of_teaching_vocab = models.ManyToManyField(
Subject, verbose_name="Subject of teaching", blank=True
)


class PersonRequestorOfPerson(TibScholRelationMixin):
Expand All @@ -750,6 +766,9 @@ class PersonRequestorOfPerson(TibScholRelationMixin):
verbose_name="subject of teaching",
)
)
subject_of_teaching_vocab = models.ManyToManyField(
Subject, verbose_name="Subject of teaching", blank=True
)


class PersonScribeOfInstance(TibScholRelationMixin):
Expand Down Expand Up @@ -801,6 +820,7 @@ class PersonStudentOfPerson(TibScholRelationMixin):
blank=True,
null=True,
verbose_name="subject of teaching",
editable=False,
)
)

Expand Down

0 comments on commit 1223075

Please sign in to comment.