6
6
from django .db .models .functions import Concat
7
7
from mptt .fields import TreeForeignKey
8
8
from mptt .models import MPTTModel
9
- from six import python_2_unicode_compatible
10
9
from treebeard .mp_tree import MP_Node
11
10
from treebeard .ns_tree import NS_Node
12
11
@@ -39,7 +38,6 @@ def as_sql(self, compiler, connection):
39
38
return "%s <> %s" % (lhs , rhs ), params
40
39
41
40
42
- @python_2_unicode_compatible
43
41
class BasePage (models .Model ):
44
42
name = models .TextField ()
45
43
slug = models .CharField (unique = True , null = False , blank = False , max_length = 255 )
@@ -72,7 +70,6 @@ class TBNSPage(NS_Node, BasePage):
72
70
subtree = NS_Subtree ()
73
71
74
72
75
- @python_2_unicode_compatible
76
73
class PageBase (BasePage ):
77
74
descendants = Relationship (
78
75
"self" ,
@@ -99,7 +96,6 @@ class Categorised(models.Model):
99
96
category_codes = models .TextField ()
100
97
101
98
102
- @python_2_unicode_compatible
103
99
class CategoryBase (models .Model ):
104
100
code = models .CharField (unique = True , max_length = 255 )
105
101
members = Relationship (
@@ -117,7 +113,6 @@ class Category(CategoryBase):
117
113
pass
118
114
119
115
120
- @python_2_unicode_compatible
121
116
class Product (models .Model ):
122
117
sku = models .CharField (max_length = 13 )
123
118
colour = models .CharField (max_length = 20 )
@@ -133,7 +128,6 @@ def __str__(self):
133
128
)
134
129
135
130
136
- @python_2_unicode_compatible
137
131
class CartItem (models .Model ):
138
132
product_code = models .CharField (max_length = 13 )
139
133
description = models .TextField ()
@@ -150,7 +144,6 @@ def __str__(self):
150
144
return "Cart item #%s: SKU %s" % (self .pk , self .sku )
151
145
152
146
153
- @python_2_unicode_compatible
154
147
class ProductFilter (models .Model ):
155
148
fcolour = models .CharField (max_length = 20 )
156
149
fsize = models .IntegerField ()
@@ -169,15 +162,13 @@ def __str__(self):
169
162
return "ProductFilter #%d: %s size %s" % (self .pk , self .fcolour , self .fsize )
170
163
171
164
172
- @python_2_unicode_compatible
173
165
class User (models .Model ):
174
166
username = models .CharField (primary_key = True , max_length = 255 )
175
167
176
168
def __str__ (self ):
177
169
return self .username
178
170
179
171
180
- @python_2_unicode_compatible
181
172
class Chemical (models .Model ):
182
173
formula = models .TextField ()
183
174
chemical_name = models .TextField ()
0 commit comments