From f3c43ad1fd9556f0fd026a5dfa93c67a5cf186ca Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 19 Nov 2016 21:54:19 +0100 Subject: Refs #23919 -- Removed python_2_unicode_compatible decorator usage --- tests/m2m_through/models.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'tests/m2m_through') 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( -- cgit v1.3