summaryrefslogtreecommitdiff
path: root/tests/prefetch_related
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2016-11-19 21:54:19 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-18 13:44:34 +0100
commitf3c43ad1fd9556f0fd026a5dfa93c67a5cf186ca (patch)
tree65ca40d4527b377845cdd382456383bf97caafa6 /tests/prefetch_related
parentd7b9aaa366dd54ecc3142c588162e3adc7c2f7ac (diff)
downloaddjango-f3c43ad1fd9556f0fd026a5dfa93c67a5cf186ca.tar.gz
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
Diffstat (limited to 'tests/prefetch_related')
-rw-r--r--tests/prefetch_related/models.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/tests/prefetch_related/models.py b/tests/prefetch_related/models.py
index 064ce1dfbd..c995acb684 100644
--- a/tests/prefetch_related/models.py
+++ b/tests/prefetch_related/models.py
@@ -5,13 +5,11 @@ 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
from django.utils.functional import cached_property
# Basic tests
-@python_2_unicode_compatible
class Author(models.Model):
name = models.CharField(max_length=50, unique=True)
first_book = models.ForeignKey('Book', models.CASCADE, related_name='first_time_authors')
@@ -38,7 +36,6 @@ class FavoriteAuthors(models.Model):
ordering = ['id']
-@python_2_unicode_compatible
class AuthorAddress(models.Model):
author = models.ForeignKey(Author, models.CASCADE, to_field='name', related_name='addresses')
address = models.TextField()
@@ -50,7 +47,6 @@ class AuthorAddress(models.Model):
return self.address
-@python_2_unicode_compatible
class Book(models.Model):
title = models.CharField(max_length=255)
authors = models.ManyToManyField(Author, related_name='books')
@@ -74,7 +70,6 @@ class Bio(models.Model):
books = models.ManyToManyField(Book, blank=True)
-@python_2_unicode_compatible
class Reader(models.Model):
name = models.CharField(max_length=50)
books_read = models.ManyToManyField(Book, related_name='read_by')
@@ -105,7 +100,6 @@ class TeacherManager(models.Manager):
return super(TeacherManager, self).get_queryset().prefetch_related('qualifications')
-@python_2_unicode_compatible
class Teacher(models.Model):
name = models.CharField(max_length=50)
qualifications = models.ManyToManyField(Qualification)
@@ -129,7 +123,6 @@ class Department(models.Model):
# GenericRelation/GenericForeignKey tests
-@python_2_unicode_compatible
class TaggedItem(models.Model):
tag = models.SlugField()
content_type = models.ForeignKey(
@@ -230,7 +223,6 @@ class Person(models.Model):
# Models for nullable FK tests
-@python_2_unicode_compatible
class Employee(models.Model):
name = models.CharField(max_length=50)
boss = models.ForeignKey('self', models.SET_NULL, null=True, related_name='serfs')
@@ -244,7 +236,6 @@ class Employee(models.Model):
# Ticket #19607
-@python_2_unicode_compatible
class LessonEntry(models.Model):
name1 = models.CharField(max_length=200)
name2 = models.CharField(max_length=200)
@@ -253,7 +244,6 @@ class LessonEntry(models.Model):
return "%s %s" % (self.name1, self.name2)
-@python_2_unicode_compatible
class WordEntry(models.Model):
lesson_entry = models.ForeignKey(LessonEntry, models.CASCADE)
name = models.CharField(max_length=200)
@@ -264,7 +254,6 @@ class WordEntry(models.Model):
# Ticket #21410: Regression when related_name="+"
-@python_2_unicode_compatible
class Author2(models.Model):
name = models.CharField(max_length=50, unique=True)
first_book = models.ForeignKey('Book', models.CASCADE, related_name='first_time_authors+')