Add brand_full_name for BrandInfo

Brightcells 7 years ago
parent
commit
145973f8f0
4 changed files with 25 additions and 4 deletions
  1. 1 1
      api/encrypt_views.py
  2. 20 0
      mch/migrations/0011_modelinfo_model_full_name.py
  3. 1 0
      mch/models.py
  4. 3 3
      requirements.txt

+ 1 - 1
api/encrypt_views.py

@@ -85,7 +85,7 @@ def decrypt(request):
85 85
         'goodsInfo': {
86 86
             'Brand': brand.brand_name if brand else '',
87 87
             'ModelID': model_pk,
88
-            'Model': model.model_name if model else '',
88
+            'Model': model.model_full_name if model else '',
89 89
             'SerialNo': sn,
90 90
         }
91 91
     })

+ 20 - 0
mch/migrations/0011_modelinfo_model_full_name.py

@@ -0,0 +1,20 @@
1
+# -*- coding: utf-8 -*-
2
+# Generated by Django 1.11.11 on 2018-04-01 10:20
3
+from __future__ import unicode_literals
4
+
5
+from django.db import migrations, models
6
+
7
+
8
+class Migration(migrations.Migration):
9
+
10
+    dependencies = [
11
+        ('mch', '0010_modelinfo_integral'),
12
+    ]
13
+
14
+    operations = [
15
+        migrations.AddField(
16
+            model_name='modelinfo',
17
+            name='model_full_name',
18
+            field=models.CharField(blank=True, help_text='\u578b\u53f7\u5168\u540d\u79f0', max_length=255, null=True, verbose_name='model_full_name'),
19
+        ),
20
+    ]

+ 1 - 0
mch/models.py

@@ -71,6 +71,7 @@ class ModelInfo(BaseModelMixin):
71 71
 
72 72
     model_id = ShortUUIDField(_(u'model_id'), max_length=32, help_text=u'型号唯一标识', db_index=True, unique=True)
73 73
     model_name = models.CharField(_(u'model_name'), max_length=255, blank=True, null=True, help_text=u'型号名称')
74
+    model_full_name = models.CharField(_(u'model_full_name'), max_length=255, blank=True, null=True, help_text=u'型号全名称')
74 75
     model_descr = models.TextField(_(u'model_descr'), max_length=255, blank=True, null=True, help_text=u'型号描述')
75 76
 
76 77
     integral = models.IntegerField(_(u'integral'), default=100, help_text=u'积分')

+ 3 - 3
requirements.txt

@@ -5,7 +5,7 @@ Pillow==5.0.0
5 5
 StatusCode==1.0.0
6 6
 TimeConvert==1.4.3
7 7
 cryptography==1.5.2
8
-django-admin==1.2.0
8
+django-admin==1.2.3
9 9
 django-curtail-uuid==1.0.4
10 10
 django-detect==1.0.5
11 11
 django-file-md5==1.0.2
@@ -39,8 +39,8 @@ pywe-oauth==1.0.6
39 39
 pywe-pay==1.0.11
40 40
 pywe-pay-notify==1.0.4
41 41
 pywe-response==1.0.1
42
-pywe-sign==1.0.7
43
-pywe-xml==1.0.0
42
+pywe-sign==1.0.8
43
+pywe-xml==1.0.3
44 44
 qiniu==7.2.0
45 45
 redis==2.10.6
46 46
 redis-extensions==1.2.1