mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
class MyFileField(models.FileField):
|
||||
pass
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Member(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
birthdate = models.DateTimeField(blank=True, null=True)
|
||||
@@ -18,7 +16,6 @@ class Member(models.Model):
|
||||
return self.name
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Band(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
style = models.CharField(max_length=20)
|
||||
@@ -28,7 +25,6 @@ class Band(models.Model):
|
||||
return self.name
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Album(models.Model):
|
||||
band = models.ForeignKey(Band, models.CASCADE)
|
||||
name = models.CharField(max_length=100)
|
||||
@@ -44,7 +40,6 @@ class HiddenInventoryManager(models.Manager):
|
||||
return super(HiddenInventoryManager, self).get_queryset().filter(hidden=False)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Inventory(models.Model):
|
||||
barcode = models.PositiveIntegerField(unique=True)
|
||||
parent = models.ForeignKey('self', models.SET_NULL, to_field='barcode', blank=True, null=True)
|
||||
@@ -79,7 +74,6 @@ class Event(models.Model):
|
||||
min_age = models.IntegerField(blank=True, null=True)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Car(models.Model):
|
||||
owner = models.ForeignKey(User, models.CASCADE)
|
||||
make = models.CharField(max_length=30)
|
||||
@@ -134,7 +128,6 @@ class Advisor(models.Model):
|
||||
companies = models.ManyToManyField(Company)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Student(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
@@ -145,7 +138,6 @@ class Student(models.Model):
|
||||
ordering = ('name',)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class School(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
students = models.ManyToManyField(Student, related_name='current_schools')
|
||||
@@ -155,7 +147,6 @@ class School(models.Model):
|
||||
return self.name
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Profile(models.Model):
|
||||
user = models.ForeignKey('auth.User', models.CASCADE, to_field='username')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user