mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
This commit is contained in:
parent
d7b9aaa366
commit
f3c43ad1fd
160 changed files with 23 additions and 757 deletions
|
@ -3,10 +3,8 @@ Tests for F() query expression syntax.
|
|||
"""
|
||||
|
||||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Employee(models.Model):
|
||||
firstname = models.CharField(max_length=50)
|
||||
lastname = models.CharField(max_length=50)
|
||||
|
@ -16,7 +14,6 @@ class Employee(models.Model):
|
|||
return '%s %s' % (self.firstname, self.lastname)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Company(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
num_employees = models.PositiveIntegerField()
|
||||
|
@ -35,7 +32,6 @@ class Company(models.Model):
|
|||
return self.name
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Number(models.Model):
|
||||
integer = models.BigIntegerField(db_column='the_integer')
|
||||
float = models.FloatField(null=True, db_column='the_float')
|
||||
|
@ -59,7 +55,6 @@ class Experiment(models.Model):
|
|||
return self.end - self.start
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Result(models.Model):
|
||||
experiment = models.ForeignKey(Experiment, models.CASCADE)
|
||||
result_time = models.DateTimeField()
|
||||
|
@ -68,7 +63,6 @@ class Result(models.Model):
|
|||
return "Result at %s" % self.result_time
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Time(models.Model):
|
||||
time = models.TimeField(null=True)
|
||||
|
||||
|
@ -76,7 +70,6 @@ class Time(models.Model):
|
|||
return "%s" % self.time
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class SimulationRun(models.Model):
|
||||
start = models.ForeignKey(Time, models.CASCADE, null=True, related_name='+')
|
||||
end = models.ForeignKey(Time, models.CASCADE, null=True, related_name='+')
|
||||
|
@ -86,7 +79,6 @@ class SimulationRun(models.Model):
|
|||
return "%s (%s to %s)" % (self.midpoint, self.start, self.end)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class UUID(models.Model):
|
||||
uuid = models.UUIDField(null=True)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue