1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

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

@@ -8,7 +8,6 @@ from decimal import Decimal
from django.db import models
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
class CategoryMetaDataManager(models.Manager):
@@ -17,7 +16,6 @@ class CategoryMetaDataManager(models.Manager):
return self.get(kind=kind, name=name)
@python_2_unicode_compatible
class CategoryMetaData(models.Model):
kind = models.CharField(max_length=10)
name = models.CharField(max_length=10)
@@ -34,7 +32,6 @@ class CategoryMetaData(models.Model):
return (self.kind, self.name)
@python_2_unicode_compatible
class Category(models.Model):
name = models.CharField(max_length=20)
meta_data = models.ForeignKey(CategoryMetaData, models.SET_NULL, null=True, default=None)
@@ -46,7 +43,6 @@ class Category(models.Model):
return self.name
@python_2_unicode_compatible
class Author(models.Model):
name = models.CharField(max_length=20)
@@ -57,7 +53,6 @@ class Author(models.Model):
return self.name
@python_2_unicode_compatible
class Article(models.Model):
author = models.ForeignKey(Author, models.CASCADE)
headline = models.CharField(max_length=50)
@@ -72,7 +67,6 @@ class Article(models.Model):
return self.headline
@python_2_unicode_compatible
class AuthorProfile(models.Model):
author = models.OneToOneField(Author, models.CASCADE, primary_key=True)
date_of_birth = models.DateField()
@@ -81,7 +75,6 @@ class AuthorProfile(models.Model):
return "Profile of %s" % self.author
@python_2_unicode_compatible
class Actor(models.Model):
name = models.CharField(max_length=20, primary_key=True)
@@ -92,7 +85,6 @@ class Actor(models.Model):
return self.name
@python_2_unicode_compatible
class Movie(models.Model):
actor = models.ForeignKey(Actor, models.CASCADE)
title = models.CharField(max_length=50)
@@ -109,7 +101,6 @@ class Score(models.Model):
score = models.FloatField()
@python_2_unicode_compatible
class Team(object):
def __init__(self, title):
self.title = title
@@ -146,7 +137,6 @@ class TeamField(models.CharField):
return name, path, args, kwargs
@python_2_unicode_compatible
class Player(models.Model):
name = models.CharField(max_length=50)
rank = models.IntegerField()