|
79
|
+ </div>
|
|
|
80
|
+ </label>
|
|
|
81
|
+ <label class="weui_cell weui_check_label" for="n">
|
|
|
82
|
+ <div class="weui_cell_bd weui_cell_primary">
|
|
|
83
|
+ <li type="circle">N</li>
|
|
|
84
|
+ </div>
|
|
|
85
|
+ <div class="weui_cell_ft">
|
|
|
86
|
+ <input type="radio" class="weui_check" name="mount" id="n" value="N">
|
|
|
87
|
+ <span class="weui_icon_checked"></span>
|
|
|
88
|
+ </div>
|
|
|
89
|
+ </label>
|
|
|
90
|
+ <label class="weui_cell weui_check_label" for="s">
|
|
|
91
|
+ <div class="weui_cell_bd weui_cell_primary">
|
|
|
92
|
+ <li type="circle">S</li>
|
|
|
93
|
+ </div>
|
|
|
94
|
+ <div class="weui_cell_ft">
|
|
|
95
|
+ <input type="radio" class="weui_check" name="mount" id="s" value="S">
|
|
|
96
|
+ <span class="weui_icon_checked"></span>
|
|
|
97
|
+ </div>
|
|
|
98
|
+ </label>
|
|
|
99
|
+ <label class="weui_cell weui_check_label" for="p">
|
|
|
100
|
+ <div class="weui_cell_bd weui_cell_primary">
|
|
|
101
|
+ <li type="circle">P</li>
|
|
|
102
|
+ </div>
|
|
|
103
|
+ <div class="weui_cell_ft">
|
|
|
104
|
+ <input type="radio" class="weui_check" name="mount" id="p" value="P">
|
|
|
105
|
+ <span class="weui_icon_checked"></span>
|
|
|
106
|
+ </div>
|
|
|
107
|
+ </label>
|
|
|
108
|
+ </div>
|
|
38
|
109
|
<div class="weui_cell">
|
|
39
|
110
|
<div class="weui_cell_hd"><label for="" class="weui_label">机身码</label></div>
|
|
40
|
111
|
<div class="weui_cell_bd weui_cell_primary">
|
|
|
|
@@ -58,27 +129,106 @@
|
|
58
|
129
|
<input id="name" class="weui_input" type="text" value="" placeholder="请输入消费者姓名">
|
|
59
|
130
|
</div>
|
|
60
|
131
|
</div>
|
|
61
|
|
- <div class="weui_cell weui_cell_select weui_select_after">
|
|
|
132
|
+{# <div class="weui_cell weui_cell_select weui_select_after">#}
|
|
|
133
|
+{# <div class="weui_cell_hd"><label for="" class="weui_label">性别</label></div>#}
|
|
|
134
|
+{# <div class="weui_cell_bd weui_cell_primary">#}
|
|
|
135
|
+{# <select id="sex" class="weui_select" name="select">#}
|
|
|
136
|
+{# <option value="1">男</option>#}
|
|
|
137
|
+{# <option value="0">女</option>#}
|
|
|
138
|
+{# </select>#}
|
|
|
139
|
+{# </div>#}
|
|
|
140
|
+{# </div>#}
|
|
|
141
|
+ <div class="weui_cell">
|
|
62
|
142
|
<div class="weui_cell_hd"><label for="" class="weui_label">性别</label></div>
|
|
63
|
143
|
<div class="weui_cell_bd weui_cell_primary">
|
|
64
|
|
- <select id="sex" class="weui_select" name="select">
|
|
65
|
|
- <option value="1">男</option>
|
|
66
|
|
- <option value="0">女</option>
|
|
67
|
|
- </select>
|
|
|
144
|
+ <input id="sex" class="weui_input" type="text" value="" placeholder="请选择消费者性别" disabled>
|
|
68
|
145
|
</div>
|
|
69
|
146
|
</div>
|
|
70
|
|
- <div class="weui_cell weui_cell_select weui_select_after">
|
|
71
|
|
- <div class="weui_cell_hd"><label for="" class="weui_label">年龄</label></div>
|
|
|
147
|
+ <div id="sex_radio" class="weui_cells weui_cells_radio radio_cells">
|
|
|
148
|
+ <label class="weui_cell weui_check_label" for="male">
|
|
|
149
|
+ <div class="weui_cell_bd weui_cell_primary">
|
|
|
150
|
+ <li type="circle">先生</li>
|
|
|
151
|
+ </div>
|
|
|
152
|
+ <div class="weui_cell_ft">
|
|
|
153
|
+ <input type="radio" class="weui_check" name="sex" id="male" value="1" checked="checked">
|
|
|
154
|
+ <span class="weui_icon_checked"></span>
|
|
|
155
|
+ </div>
|
|
|
156
|
+ </label>
|
|
|
157
|
+ <label class="weui_cell weui_check_label" for="female">
|
|
|
158
|
+ <div class="weui_cell_bd weui_cell_primary">
|
|
|
159
|
+ <li type="circle">女士</li>
|
|
|
160
|
+ </div>
|
|
|
161
|
+ <div class="weui_cell_ft">
|
|
|
162
|
+ <input type="radio" class="weui_check" name="sex" id="female" value="0">
|
|
|
163
|
+ <span class="weui_icon_checked"></span>
|
|
|
164
|
+ </div>
|
|
|
165
|
+ </label>
|
|
|
166
|
+ </div>
|
|
|
167
|
+{# <div class="weui_cell weui_cell_select weui_select_after">#}
|
|
|
168
|
+{# <div class="weui_cell_hd"><label for="" class="weui_label">年龄</label></div>#}
|
|
|
169
|
+{# <div class="weui_cell_bd weui_cell_primary">#}
|
|
|
170
|
+{# <select id="age" class="weui_select" name="select">#}
|
|
|
171
|
+{# <option value="1">20周岁以下</option>#}
|
|
|
172
|
+{# <option value="2">20~30周岁</option>#}
|
|
|
173
|
+{# <option value="3">30~40周岁</option>#}
|
|
|
174
|
+{# <option value="4">40~50周岁</option>#}
|
|
|
175
|
+{# <option value="5">50周岁以上</option>#}
|
|
|
176
|
+{# </select>#}
|
|
|
177
|
+{# </div>#}
|
|
|
178
|
+{# </div>#}
|
|
|
179
|
+ <div class="weui_cell">
|
|
|
180
|
+ <div class="weui_cell_hd"><label for="" class="weui_label">年龄段</label></div>
|
|
72
|
181
|
<div class="weui_cell_bd weui_cell_primary">
|
|
73
|
|
- <select id="age" class="weui_select" name="select">
|
|
74
|
|
- <option value="1">20周岁以下</option>
|
|
75
|
|
- <option value="2">20~30周岁</option>
|
|
76
|
|
- <option value="3">30~40周岁</option>
|
|
77
|
|
- <option value="4">40~50周岁</option>
|
|
78
|
|
- <option value="5">50周岁以上</option>
|
|
79
|
|
- </select>
|
|
|
182
|
+ <input id="age" class="weui_input" type="text" value="" placeholder="请选择消费者年龄段" disabled>
|
|
80
|
183
|
</div>
|
|
81
|
184
|
</div>
|
|
|
185
|
+ <div id="age_radio" class="weui_cells weui_cells_radio radio_cells">
|
|
|
186
|
+ <label class="weui_cell weui_check_label" for="age1">
|
|
|
187
|
+ <div class="weui_cell_bd weui_cell_primary">
|
|
|
188
|
+ <li type="circle">20周岁以下</li>
|
|
|
189
|
+ </div>
|
|
|
190
|
+ <div class="weui_cell_ft">
|
|
|
191
|
+ <input type="radio" class="weui_check" name="age" id="age1" value="1" checked="checked">
|
|
|
192
|
+ <span class="weui_icon_checked"></span>
|
|
|
193
|
+ </div>
|
|
|
194
|
+ </label>
|
|
|
195
|
+ <label class="weui_cell weui_check_label" for="age2">
|
|
|
196
|
+ <div class="weui_cell_bd weui_cell_primary">
|
|
|
197
|
+ <li type="circle">20~30周岁</li>
|
|
|
198
|
+ </div>
|
|
|
199
|
+ <div class="weui_cell_ft">
|
|
|
200
|
+ <input type="radio" class="weui_check" name="age" id="age2" value="2">
|
|
|
201
|
+ <span class="weui_icon_checked"></span>
|
|
|
202
|
+ </div>
|
|
|
203
|
+ </label>
|
|
|
204
|
+ <label class="weui_cell weui_check_label" for="age3">
|
|
|
205
|
+ <div class="weui_cell_bd weui_cell_primary">
|
|
|
206
|
+ <li type="circle">30~40周岁</li>
|
|
|
207
|
+ </div>
|
|
|
208
|
+ <div class="weui_cell_ft">
|
|
|
209
|
+ <input type="radio" class="weui_check" name="age" id="age3" value="3">
|
|
|
210
|
+ <span class="weui_icon_checked"></span>
|
|
|
211
|
+ </div>
|
|
|
212
|
+ </label>
|
|
|
213
|
+ <label class="weui_cell weui_check_label" for="age4">
|
|
|
214
|
+ <div class="weui_cell_bd weui_cell_primary">
|
|
|
215
|
+ <li type="circle">40~50周岁</li>
|
|
|
216
|
+ </div>
|
|
|
217
|
+ <div class="weui_cell_ft">
|
|
|
218
|
+ <input type="radio" class="weui_check" name="age" id="age4" value="4">
|
|
|
219
|
+ <span class="weui_icon_checked"></span>
|
|
|
220
|
+ </div>
|
|
|
221
|
+ </label>
|
|
|
222
|
+ <label class="weui_cell weui_check_label" for="age5">
|
|
|
223
|
+ <div class="weui_cell_bd weui_cell_primary">
|
|
|
224
|
+ <li type="circle">50周岁以上</li>
|
|
|
225
|
+ </div>
|
|
|
226
|
+ <div class="weui_cell_ft">
|
|
|
227
|
+ <input type="radio" class="weui_check" name="age" id="age5" value="5">
|
|
|
228
|
+ <span class="weui_icon_checked"></span>
|
|
|
229
|
+ </div>
|
|
|
230
|
+ </label>
|
|
|
231
|
+ </div>
|
|
82
|
232
|
<div class="weui_cell">
|
|
83
|
233
|
<div class="weui_cell_hd"><label for="" class="weui_label">手机号</label></div>
|
|
84
|
234
|
<div class="weui_cell_bd weui_cell_primary">
|
|
|
|
@@ -154,7 +304,8 @@
|
|
154
|
304
|
return {
|
|
155
|
305
|
step: 1,
|
|
156
|
306
|
clerk_id: clerk_id,
|
|
157
|
|
- model_id: $('#model option:checked').val(),
|
|
|
307
|
+ model_id: $("#model_radio input[name='model']:checked").val(),
|
|
|
308
|
+ mount: $("#mount_radio input[name='mount']:checked").val(),
|
|
158
|
309
|
code: code,
|
|
159
|
310
|
}
|
|
160
|
311
|
}
|
|
|
|
@@ -187,11 +338,12 @@
|
|
187
|
338
|
return {
|
|
188
|
339
|
step: 2,
|
|
189
|
340
|
clerk_id: clerk_id,
|
|
190
|
|
- model_id: $('#model option:checked').val(),
|
|
|
341
|
+ model_id: $("#model_radio input[name='model']:checked").val(),
|
|
|
342
|
+ mount: $("#mount_radio input[name='mount']:checked").val(),
|
|
191
|
343
|
code: code,
|
|
192
|
344
|
name: name,
|
|
193
|
|
- sex: $('#sex option:checked').val(),
|
|
194
|
|
- age: $('#age option:checked').val(),
|
|
|
345
|
+ sex: $("#sex_radio input[name='sex']:checked").val(),
|
|
|
346
|
+ age: $("#age_radio input[name='age']:checked").val(),
|
|
195
|
347
|
phone: $('#phone').val(),
|
|
196
|
348
|
}
|
|
197
|
349
|
}
|
|
|
|
@@ -7,9 +7,9 @@ from product.models import ProductCodeSubmitLogInfo, ProductInfo, ProductModelIn
|
|
7
|
7
|
|
|
8
|
8
|
class ProductModelInfoAdmin(admin.ModelAdmin):
|
|
9
|
9
|
readonly_fields = ('model_id', )
|
|
10
|
|
- list_display = ('model_id', 'model_name', 'integral', 'status', 'created_at', 'updated_at')
|
|
|
10
|
+ list_display = ('model_id', 'model_name', 'integral', 'has_mount', 'status', 'created_at', 'updated_at')
|
|
11
|
11
|
search_fields = ('model_id', 'model_name')
|
|
12
|
|
- list_filter = ('status', )
|
|
|
12
|
+ list_filter = ('has_mount', 'status')
|
|
13
|
13
|
|
|
14
|
14
|
|
|
15
|
15
|
class ProductInfoAdmin(admin.ModelAdmin):
|
|
|
|
@@ -19,9 +19,9 @@ class ProductInfoAdmin(admin.ModelAdmin):
|
|
19
|
19
|
|
|
20
|
20
|
|
|
21
|
21
|
class ProductCodeSubmitLogInfoAdmin(admin.ModelAdmin):
|
|
22
|
|
- list_display = ('model_id', 'model_name', 'code', 'franchiser_id', 'clerk_id', 'consumer_name', 'consumer_sex', 'consumer_age', 'consumer_phone', 'status', 'created_at', 'updated_at')
|
|
|
22
|
+ list_display = ('model_id', 'model_name', 'mount', 'code', 'franchiser_id', 'clerk_id', 'consumer_name', 'consumer_sex', 'consumer_age', 'consumer_phone', 'status', 'created_at', 'updated_at')
|
|
23
|
23
|
search_fields = ('model_id', 'model_name', 'code', 'consumer_name', 'consumer_phone')
|
|
24
|
|
- list_filter = ('franchiser_id', 'consumer_sex', 'status')
|
|
|
24
|
+ list_filter = ('mount', 'franchiser_id', 'consumer_sex', 'status')
|
|
25
|
25
|
|
|
26
|
26
|
|
|
27
|
27
|
admin.site.register(ProductModelInfo, ProductModelInfoAdmin)
|
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+# -*- coding: utf-8 -*-
|
|
|
2
|
+from __future__ import unicode_literals
|
|
|
3
|
+
|
|
|
4
|
+from django.db import models, migrations
|
|
|
5
|
+
|
|
|
6
|
+
|
|
|
7
|
+class Migration(migrations.Migration):
|
|
|
8
|
+
|
|
|
9
|
+ dependencies = [
|
|
|
10
|
+ ('product', '0002_auto_20170619_1734'),
|
|
|
11
|
+ ]
|
|
|
12
|
+
|
|
|
13
|
+ operations = [
|
|
|
14
|
+ migrations.AddField(
|
|
|
15
|
+ model_name='productcodesubmitloginfo',
|
|
|
16
|
+ name='mount',
|
|
|
17
|
+ field=models.IntegerField(default=0, help_text='\u5361\u53e3', db_index=True, verbose_name='mount', choices=[(0, ''), (1, 'E'), (2, 'N'), (3, 'P'), (4, 'S')]),
|
|
|
18
|
+ ),
|
|
|
19
|
+ migrations.AddField(
|
|
|
20
|
+ model_name='productinfo',
|
|
|
21
|
+ name='mount',
|
|
|
22
|
+ field=models.IntegerField(default=0, help_text='\u5361\u53e3', db_index=True, verbose_name='mount', choices=[(0, ''), (1, 'E'), (2, 'N'), (3, 'P'), (4, 'S')]),
|
|
|
23
|
+ ),
|
|
|
24
|
+ migrations.AddField(
|
|
|
25
|
+ model_name='productmodelinfo',
|
|
|
26
|
+ name='has_mount',
|
|
|
27
|
+ field=models.BooleanField(default=True, help_text='\u662f\u5426\u6709\u5361\u53e3', db_index=True, verbose_name='has_mount'),
|
|
|
28
|
+ ),
|
|
|
29
|
+ migrations.AlterField(
|
|
|
30
|
+ model_name='productmodelinfo',
|
|
|
31
|
+ name='model_name',
|
|
|
32
|
+ field=models.CharField(null=True, max_length=255, blank=True, help_text='\u578b\u53f7\u540d\u79f0', unique=True, verbose_name='model_name'),
|
|
|
33
|
+ ),
|
|
|
34
|
+ ]
|
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+# -*- coding: utf-8 -*-
|
|
|
2
|
+from __future__ import unicode_literals
|
|
|
3
|
+
|
|
|
4
|
+from django.db import models, migrations
|
|
|
5
|
+
|
|
|
6
|
+
|
|
|
7
|
+class Migration(migrations.Migration):
|
|
|
8
|
+
|
|
|
9
|
+ dependencies = [
|
|
|
10
|
+ ('product', '0003_auto_20170630_0220'),
|
|
|
11
|
+ ]
|
|
|
12
|
+
|
|
|
13
|
+ operations = [
|
|
|
14
|
+ migrations.AlterField(
|
|
|
15
|
+ model_name='productcodesubmitloginfo',
|
|
|
16
|
+ name='mount',
|
|
|
17
|
+ field=models.CharField(max_length=255, blank=True, help_text='\u5361\u53e3', null=True, verbose_name='mount', db_index=True),
|
|
|
18
|
+ ),
|
|
|
19
|
+ migrations.AlterField(
|
|
|
20
|
+ model_name='productinfo',
|
|
|
21
|
+ name='mount',
|
|
|
22
|
+ field=models.CharField(max_length=255, blank=True, help_text='\u5361\u53e3', null=True, verbose_name='mount', db_index=True),
|
|
|
23
|
+ ),
|
|
|
24
|
+ ]
|
|
|
|
@@ -4,13 +4,14 @@ from django.db import models
|
|
4
|
4
|
from django.utils.translation import ugettext_lazy as _
|
|
5
|
5
|
from shortuuidfield import ShortUUIDField
|
|
6
|
6
|
|
|
7
|
|
-from tamron.basemodels import CreateUpdateMixin
|
|
|
7
|
+from tamron.basemodels import CreateUpdateMixin, SexChoicesMixin
|
|
8
|
8
|
|
|
9
|
9
|
|
|
10
|
10
|
class ProductModelInfo(CreateUpdateMixin):
|
|
11
|
11
|
model_id = ShortUUIDField(_(u'model_id'), max_length=255, help_text=u'型号唯一标识', db_index=True, unique=True)
|
|
12
|
|
- model_name = models.CharField(_(u'model_name'), max_length=255, blank=True, null=True, help_text=u'型号名称')
|
|
|
12
|
+ model_name = models.CharField(_(u'model_name'), max_length=255, blank=True, null=True, help_text=u'型号名称', unique=True)
|
|
13
|
13
|
integral = models.IntegerField(_(u'integral'), default=0, help_text=u'型号积分')
|
|
|
14
|
+ has_mount = models.BooleanField(_(u'has_mount'), default=True, help_text=u'是否有卡口', db_index=True)
|
|
14
|
15
|
|
|
15
|
16
|
class Meta:
|
|
16
|
17
|
verbose_name = _(u'产品型号信息')
|
|
|
|
@@ -25,21 +26,15 @@ class ProductModelInfo(CreateUpdateMixin):
|
|
25
|
26
|
'model_id': self.model_id,
|
|
26
|
27
|
'model_name': self.model_name,
|
|
27
|
28
|
'integral': self.integral,
|
|
|
29
|
+ 'has_mount': self.has_mount,
|
|
28
|
30
|
}
|
|
29
|
31
|
|
|
30
|
32
|
|
|
31
|
|
-class ProductInfo(CreateUpdateMixin):
|
|
32
|
|
- MALE = 1
|
|
33
|
|
- FEMALE = 0
|
|
34
|
|
-
|
|
35
|
|
- SEX_TYPE = (
|
|
36
|
|
- (MALE, u'男'),
|
|
37
|
|
- (FEMALE, u'女'),
|
|
38
|
|
- )
|
|
39
|
|
-
|
|
|
33
|
+class ProductInfo(CreateUpdateMixin, SexChoicesMixin):
|
|
40
|
34
|
model_id = models.CharField(_(u'model_id'), max_length=255, blank=True, null=True, help_text=u'型号唯一标识', db_index=True)
|
|
41
|
35
|
model_name = models.CharField(_(u'model_name'), max_length=255, blank=True, null=True, help_text=u'型号名称', db_index=True)
|
|
42
|
36
|
|
|
|
37
|
+ mount = models.CharField(_(u'mount'), max_length=255, blank=True, null=True, help_text=u'卡口', db_index=True)
|
|
43
|
38
|
code = models.CharField(_(u'code'), max_length=255, blank=True, null=True, help_text=u'机身码')
|
|
44
|
39
|
code_status = models.BooleanField(_(u'code_status'), default=False, help_text=u'机身码状态, True已使用,False未使用', db_index=True)
|
|
45
|
40
|
|
|
|
|
@@ -50,7 +45,7 @@ class ProductInfo(CreateUpdateMixin):
|
|
50
|
45
|
clerk_id = models.CharField(_(u'clerk_id'), max_length=255, blank=True, null=True, help_text=u'店员唯一标识', db_index=True)
|
|
51
|
46
|
|
|
52
|
47
|
consumer_name = models.CharField(_(u'consumer_name'), max_length=255, blank=True, null=True, help_text=u'消费者名称')
|
|
53
|
|
- consumer_sex = models.IntegerField(_(u'consumer_sex'), choices=SEX_TYPE, default=MALE, help_text=u'消费者性别', db_index=True)
|
|
|
48
|
+ consumer_sex = models.IntegerField(_(u'consumer_sex'), choices=SexChoicesMixin.SEX_TYPE, default=SexChoicesMixin.MALE, help_text=u'消费者性别', db_index=True)
|
|
54
|
49
|
consumer_age = models.IntegerField(_(u'consumer_age'), default=0, help_text=u'消费者年龄')
|
|
55
|
50
|
consumer_phone = models.CharField(_(u'consumer_phone'), max_length=255, blank=True, null=True, help_text=u'消费者联系电话')
|
|
56
|
51
|
|
|
|
|
@@ -70,24 +65,17 @@ class ProductInfo(CreateUpdateMixin):
|
|
70
|
65
|
}
|
|
71
|
66
|
|
|
72
|
67
|
|
|
73
|
|
-class ProductCodeSubmitLogInfo(CreateUpdateMixin):
|
|
74
|
|
- MALE = 1
|
|
75
|
|
- FEMALE = 0
|
|
76
|
|
-
|
|
77
|
|
- SEX_TYPE = (
|
|
78
|
|
- (MALE, u'男'),
|
|
79
|
|
- (FEMALE, u'女'),
|
|
80
|
|
- )
|
|
81
|
|
-
|
|
|
68
|
+class ProductCodeSubmitLogInfo(CreateUpdateMixin, SexChoicesMixin):
|
|
82
|
69
|
model_id = models.CharField(_(u'model_id'), max_length=255, blank=True, null=True, help_text=u'型号唯一标识', db_index=True)
|
|
83
|
70
|
model_name = models.CharField(_(u'model_name'), max_length=255, blank=True, null=True, help_text=u'型号名称', db_index=True)
|
|
|
71
|
+ mount = models.CharField(_(u'mount'), max_length=255, blank=True, null=True, help_text=u'卡口', db_index=True)
|
|
84
|
72
|
code = models.CharField(_(u'code'), max_length=255, blank=True, null=True, help_text=u'机身码')
|
|
85
|
73
|
|
|
86
|
74
|
franchiser_id = models.CharField(_(u'franchiser_id'), max_length=255, blank=True, null=True, help_text=u'经销商唯一标识', db_index=True)
|
|
87
|
75
|
clerk_id = models.CharField(_(u'clerk_id'), max_length=255, blank=True, null=True, help_text=u'店员唯一标识', db_index=True)
|
|
88
|
76
|
|
|
89
|
77
|
consumer_name = models.CharField(_(u'consumer_name'), max_length=255, blank=True, null=True, help_text=u'消费者名称')
|
|
90
|
|
- consumer_sex = models.IntegerField(_(u'consumer_sex'), choices=SEX_TYPE, default=MALE, help_text=u'消费者性别', db_index=True)
|
|
|
78
|
+ consumer_sex = models.IntegerField(_(u'consumer_sex'), choices=SexChoicesMixin.SEX_TYPE, default=SexChoicesMixin.MALE, help_text=u'消费者性别', db_index=True)
|
|
91
|
79
|
consumer_age = models.IntegerField(_(u'consumer_age'), default=0, help_text=u'消费者年龄')
|
|
92
|
80
|
consumer_phone = models.CharField(_(u'consumer_phone'), max_length=255, blank=True, null=True, help_text=u'消费者联系电话')
|
|
93
|
81
|
|
|
|
|
@@ -11,3 +11,16 @@ class CreateUpdateMixin(models.Model):
|
|
11
|
11
|
|
|
12
|
12
|
class Meta:
|
|
13
|
13
|
abstract = True
|
|
|
14
|
+
|
|
|
15
|
+
|
|
|
16
|
+class SexChoicesMixin(models.Model):
|
|
|
17
|
+ MALE = 1
|
|
|
18
|
+ FEMALE = 0
|
|
|
19
|
+
|
|
|
20
|
+ SEX_TYPE = (
|
|
|
21
|
+ (MALE, u'男'),
|
|
|
22
|
+ (FEMALE, u'女'),
|
|
|
23
|
+ )
|
|
|
24
|
+
|
|
|
25
|
+ class Meta:
|
|
|
26
|
+ abstract = True
|