summaryrefslogtreecommitdiff
path: root/tests/model_inheritance/models.py
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/model_inheritance/models.py
parentd7b9aaa366dd54ecc3142c588162e3adc7c2f7ac (diff)
downloaddjango-f3c43ad1fd9556f0fd026a5dfa93c67a5cf186ca.tar.gz
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
Diffstat (limited to 'tests/model_inheritance/models.py')
-rw-r--r--tests/model_inheritance/models.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/tests/model_inheritance/models.py b/tests/model_inheritance/models.py
index 4c7d4a7c8a..44bf752d00 100644
--- a/tests/model_inheritance/models.py
+++ b/tests/model_inheritance/models.py
@@ -12,7 +12,6 @@ Model inheritance exists in two varieties:
Both styles are demonstrated here.
"""
from django.db import models
-from django.utils.encoding import python_2_unicode_compatible
#
@@ -20,7 +19,6 @@ from django.utils.encoding import python_2_unicode_compatible
#
-@python_2_unicode_compatible
class CommonInfo(models.Model):
name = models.CharField(max_length=50)
age = models.PositiveIntegerField()
@@ -52,7 +50,6 @@ class Post(models.Model):
title = models.CharField(max_length=50)
-@python_2_unicode_compatible
class Attachment(models.Model):
post = models.ForeignKey(
Post,
@@ -81,7 +78,6 @@ class Link(Attachment):
# Multi-table inheritance
#
-@python_2_unicode_compatible
class Chef(models.Model):
name = models.CharField(max_length=50)
@@ -89,7 +85,6 @@ class Chef(models.Model):
return "%s the chef" % self.name
-@python_2_unicode_compatible
class Place(models.Model):
name = models.CharField(max_length=50)
address = models.CharField(max_length=80)
@@ -106,7 +101,6 @@ class Rating(models.Model):
ordering = ['-rating']
-@python_2_unicode_compatible
class Restaurant(Place, Rating):
serves_hot_dogs = models.BooleanField(default=False)
serves_pizza = models.BooleanField(default=False)
@@ -119,7 +113,6 @@ class Restaurant(Place, Rating):
return "%s the restaurant" % self.name
-@python_2_unicode_compatible
class ItalianRestaurant(Restaurant):
serves_gnocchi = models.BooleanField(default=False)
@@ -127,7 +120,6 @@ class ItalianRestaurant(Restaurant):
return "%s the italian restaurant" % self.name
-@python_2_unicode_compatible
class Supplier(Place):
customers = models.ManyToManyField(Restaurant, related_name='provider')
@@ -135,7 +127,6 @@ class Supplier(Place):
return "%s the supplier" % self.name
-@python_2_unicode_compatible
class ParkingLot(Place):
# An explicit link to the parent (we can control the attribute name).
parent = models.OneToOneField(Place, models.CASCADE, primary_key=True, parent_link=True)