mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
This commit is contained in:
parent
d7b9aaa366
commit
f3c43ad1fd
160 changed files with 23 additions and 757 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue