From 4e1a20a7440e62ec5a279c9c0068b5196b0f9048 Mon Sep 17 00:00:00 2001 From: Erik Stein Date: Wed, 27 Apr 2022 00:27:38 +0200 Subject: [PATCH] Removed Python 2 compat. --- shared/people/models.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/shared/people/models.py b/shared/people/models.py index e4d67c1..6165b3f 100644 --- a/shared/people/models.py +++ b/shared/people/models.py @@ -1,12 +1,6 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals -# Erik Stein , 2016 - - from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models -from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from polymorphic.models import PolymorphicModel @@ -16,7 +10,6 @@ from shared.utils.translation import get_translated_field from .controllers import PersonController -@python_2_unicode_compatible class ArtPersonMixin(models.Model): locations = models.CharField(_("Ort(e)"), max_length=100, blank=True, null=True) birth_year = models.PositiveIntegerField(_("Geburtsjahr"), blank=True, null=True) @@ -57,7 +50,6 @@ class PseudonymMixin(models.Model): return self.get_real_instance_class().objects.filter(models.Q(pk=self.pk) | models.Q(pk__in=self.pseudonym_set.all())) -@python_2_unicode_compatible class BasePerson(PolymorphicModel): name = models.CharField(_("Name"), max_length=200, unique=True) slug = DowngradingSlugField(_("URL-Name"), max_length=200, populate_from='name', unique_slug=True) @@ -81,7 +73,6 @@ class BasePerson(PolymorphicModel): super(BasePerson, self).save(*args, **kwargs) -@python_2_unicode_compatible class PersonRoleBase(models.Model): """ Fixtures, non-deletable: @@ -115,7 +106,6 @@ class PersonRoleBase(models.Model): return get_translated_field(self, 'name') -@python_2_unicode_compatible class GenericParticipationRelBase(models.Model): content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) object_id = models.PositiveIntegerField()