Skip to content

Commit

Permalink
refactor(apis_entities): drop core.abc.LabelBaseModel
Browse files Browse the repository at this point in the history
We decided to drop the label for the E21_Person model, because it has a
forename and a surname. Because there are now only two BaseModels left
that use the LabelBaseModel, we moved the label field directly in those
models and dropped the LabelBaseModel
  • Loading branch information
b1rger committed Mar 20, 2024
1 parent abe96bf commit edba876
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
10 changes: 6 additions & 4 deletions apis_core/apis_entities/abc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.db import models
from apis_core.core.abc import LabelBaseModel

#########################
# Abstract base classes #
Expand All @@ -11,7 +10,7 @@
# trying to implement CIDOC CRM in Django.


class E21_Person(LabelBaseModel, models.Model):
class E21_Person(models.Model):
forename = models.CharField(blank=True, default="")
surname = models.CharField(blank=True, default="")
gender = models.CharField(blank=True, default="")
Expand All @@ -22,14 +21,17 @@ class Meta:
abstract = True


class E53_Place(LabelBaseModel, models.Model):
class E53_Place(models.Model):
label = models.CharField(blank=True, default="")
longitude = models.FloatField(blank=True, null=True)
latitude = models.FloatField(blank=True, null=True)

class Meta:
abstract = True


class E74_Group(LabelBaseModel, models.Model):
class E74_Group(models.Model):
label = models.CharField(blank=True, default="")

class Meta:
abstract = True
8 changes: 0 additions & 8 deletions apis_core/core/abc.py

This file was deleted.

0 comments on commit edba876

Please sign in to comment.