Refs #23919 -- Removed python_2_unicode_compatible decorator usage

This commit is contained in:
Claude Paroz 2016-11-19 21:54:19 +01:00
parent d7b9aaa366
commit f3c43ad1fd
160 changed files with 23 additions and 757 deletions

View file

@ -14,10 +14,8 @@ from django.contrib.contenttypes.fields import (
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class TaggedItem(models.Model):
"""A tag on an item."""
tag = models.SlugField()
@ -46,7 +44,6 @@ class AbstractComparison(models.Model):
first_obj = GenericForeignKey(ct_field="content_type1", fk_field="object_id1")
@python_2_unicode_compatible
class Comparison(AbstractComparison):
"""
A model that tests having multiple GenericForeignKeys. One is defined
@ -61,7 +58,6 @@ class Comparison(AbstractComparison):
return "%s is %s than %s" % (self.first_obj, self.comparative, self.other_obj)
@python_2_unicode_compatible
class Animal(models.Model):
common_name = models.CharField(max_length=150)
latin_name = models.CharField(max_length=150)
@ -75,7 +71,6 @@ class Animal(models.Model):
return self.common_name
@python_2_unicode_compatible
class Vegetable(models.Model):
name = models.CharField(max_length=150)
is_yucky = models.BooleanField(default=True)
@ -90,7 +85,6 @@ class Carrot(Vegetable):
pass
@python_2_unicode_compatible
class Mineral(models.Model):
name = models.CharField(max_length=150)
hardness = models.PositiveSmallIntegerField()