mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
This commit is contained in:
@@ -6,12 +6,10 @@ this behavior by explicitly adding ``primary_key=True`` to a field.
|
||||
"""
|
||||
|
||||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from .fields import MyAutoField
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Employee(models.Model):
|
||||
employee_code = models.IntegerField(primary_key=True, db_column='code')
|
||||
first_name = models.CharField(max_length=20)
|
||||
@@ -24,7 +22,6 @@ class Employee(models.Model):
|
||||
return "%s %s" % (self.first_name, self.last_name)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Business(models.Model):
|
||||
name = models.CharField(max_length=20, primary_key=True)
|
||||
employees = models.ManyToManyField(Employee)
|
||||
@@ -36,7 +33,6 @@ class Business(models.Model):
|
||||
return self.name
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Bar(models.Model):
|
||||
id = MyAutoField(primary_key=True, db_index=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user