Browse Source

Removed Python 2 compat.

master
Erik Stein 3 years ago
parent
commit
4e1a20a744
  1. 10
      shared/people/models.py

10
shared/people/models.py

@ -1,12 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Erik Stein <code@classlibrary.net>, 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()

Loading…
Cancel
Save