summaryrefslogtreecommitdiff
path: root/tests/m2m_through
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/m2m_through
parentd7b9aaa366dd54ecc3142c588162e3adc7c2f7ac (diff)
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
Diffstat (limited to 'tests/m2m_through')
-rw-r--r--tests/m2m_through/models.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/m2m_through/models.py b/tests/m2m_through/models.py
index dab3be5164..5f9fba27a7 100644
--- a/tests/m2m_through/models.py
+++ b/tests/m2m_through/models.py
@@ -1,11 +1,9 @@
from datetime import datetime
from django.db import models
-from django.utils.encoding import python_2_unicode_compatible
# M2M described on one of the models
-@python_2_unicode_compatible
class Person(models.Model):
name = models.CharField(max_length=128)
@@ -16,7 +14,6 @@ class Person(models.Model):
return self.name
-@python_2_unicode_compatible
class Group(models.Model):
name = models.CharField(max_length=128)
members = models.ManyToManyField(Person, through='Membership')
@@ -34,7 +31,6 @@ class Group(models.Model):
return self.name
-@python_2_unicode_compatible
class Membership(models.Model):
person = models.ForeignKey(Person, models.CASCADE)
group = models.ForeignKey(Group, models.CASCADE)
@@ -48,7 +44,6 @@ class Membership(models.Model):
return "%s is a member of %s" % (self.person.name, self.group.name)
-@python_2_unicode_compatible
class CustomMembership(models.Model):
person = models.ForeignKey(
Person,
@@ -74,7 +69,6 @@ class TestNoDefaultsOrNulls(models.Model):
nodefaultnonull = models.CharField(max_length=5)
-@python_2_unicode_compatible
class PersonSelfRefM2M(models.Model):
name = models.CharField(max_length=5)
friends = models.ManyToManyField('self', through="Friendship", symmetrical=False)
@@ -90,7 +84,6 @@ class Friendship(models.Model):
# Custom through link fields
-@python_2_unicode_compatible
class Event(models.Model):
title = models.CharField(max_length=50)
invitees = models.ManyToManyField(
@@ -110,7 +103,6 @@ class Invitation(models.Model):
invitee = models.ForeignKey(Person, models.CASCADE, related_name='invitations')
-@python_2_unicode_compatible
class Employee(models.Model):
name = models.CharField(max_length=5)
subordinates = models.ManyToManyField(