|
76
|
+ class Meta:
|
|
|
77
|
+ verbose_name = _(u'型号图片信息')
|
|
|
78
|
+ verbose_name_plural = _(u'型号图片信息')
|
|
|
79
|
+
|
|
|
80
|
+ def __unicode__(self):
|
|
|
81
|
+ return unicode(self.pk)
|
|
|
82
|
+
|
|
|
83
|
+ @property
|
|
|
84
|
+ def image_url(self):
|
|
|
85
|
+ return upload_file_url(self.image)
|
|
|
86
|
+
|
|
|
87
|
+ @property
|
|
|
88
|
+ def data(self):
|
|
|
89
|
+ return {
|
|
|
90
|
+ 'image_url': self.image_url,
|
|
|
91
|
+ 'url': self.url,
|
|
|
92
|
+ }
|
|
|
93
|
+
|
|
54
|
94
|
|
|
55
|
95
|
class DistributorInfo(BaseModelMixin):
|
|
|
96
|
+ brand_id = models.CharField(_(u'brand_id'), max_length=32, blank=True, null=True, help_text=u'品牌唯一标识', db_index=True)
|
|
|
97
|
+
|
|
56
|
98
|
distributor_id = ShortUUIDField(_(u'distributor_id'), max_length=32, help_text=u'经销商唯一标识', db_index=True, unique=True)
|
|
57
|
99
|
distributor_name = models.CharField(_(u'distributor_name'), max_length=255, blank=True, null=True, help_text=u'经销商名称')
|
|
58
|
100
|
distributor_descr = models.TextField(_(u'distributor_descr'), max_length=255, blank=True, null=True, help_text=u'经销商描述')
|
|
|
|
@@ -18,6 +18,7 @@ django-mobi==0.1.7
|
|
18
|
18
|
django-models-ext==1.0.5
|
|
19
|
19
|
django-multidomain==1.1.4
|
|
20
|
20
|
django-paginator2==1.0.3
|
|
|
21
|
+django-response==1.0.0
|
|
21
|
22
|
django-rlog==1.0.7
|
|
22
|
23
|
django-shortuuidfield==0.1.3
|
|
23
|
24
|
django-six==1.0.4
|