m-new"> 18
+ field=models.CharField(choices=[('SONY', '索尼'), ('FUJIFILM', '富士'), ('CANON', '佳能'), ('NIKON', '尼康')], default='SONY', help_text='镜头卡口', max_length=32, verbose_name='model_mount'),
+ ),
+ migrations.AlterField(
+ model_name='modelinfo',
+ name='image',
+ field=models.ImageField(blank=True, help_text='横图', null=True, upload_to=django_models_ext.fileext.upload_path, verbose_name='image'),
+ ),
+ migrations.AlterField(
+ model_name='modelinfo',
+ name='image2',
+ field=models.ImageField(blank=True, help_text='方图', null=True, upload_to=django_models_ext.fileext.upload_path, verbose_name='image2'),
+ ),
+ ]
@@ -147,6 +147,13 @@ class BrandInfo(BaseModelMixin): |
||
| 147 | 147 |
|
| 148 | 148 |
|
| 149 | 149 |
class ModelInfo(BaseModelMixin): |
| 150 |
+ MOUNT_TUPLE = ( |
|
| 151 |
+ ('SONY', u'索尼'),
|
|
| 152 |
+ ('FUJIFILM', u'富士'),
|
|
| 153 |
+ ('CANON', u'佳能'),
|
|
| 154 |
+ ('NIKON', u'尼康'),
|
|
| 155 |
+ ) |
|
| 156 |
+ |
|
| 150 | 157 |
brand_id = models.CharField(_(u'brand_id'), max_length=32, blank=True, null=True, help_text=u'品牌唯一标识', db_index=True) |
| 151 | 158 |
brand_name = models.CharField(_(u'brand_name'), max_length=255, blank=True, null=True, help_text=u'品牌名称') |
| 152 | 159 |
|
@@ -157,14 +164,15 @@ class ModelInfo(BaseModelMixin): |
||
| 157 | 164 |
model_uni_name = models.CharField(_(u'model_uni_name'), max_length=32, blank=True, null=True, help_text=u'型号统一名称') |
| 158 | 165 |
model_full_name = models.CharField(_(u'model_full_name'), max_length=255, blank=True, null=True, help_text=u'型号全名称') |
| 159 | 166 |
model_descr = models.TextField(_(u'model_descr'), max_length=255, blank=True, null=True, help_text=u'型号描述') |
| 167 |
+ model_mount = models.CharField(_(u'model_mount'), max_length=32, choices=MOUNT_TUPLE, default='SONY', help_text=u'镜头卡口') |
|
| 160 | 168 |
|
| 161 | 169 |
category = models.CharField(_(u'category'), max_length=32, blank=True, null=True, help_text=u'型号类别', db_index=True) |
| 162 | 170 |
warehouse = models.CharField(_(u'warehouse'), max_length=32, blank=True, null=True, help_text=u'所属仓库', db_index=True) |
| 163 | 171 |
|
| 164 |
- image = models.ImageField(_(u'image'), upload_to=upload_path, blank=True, null=True, help_text=u'图片') |
|
| 172 |
+ image = models.ImageField(_(u'image'), upload_to=upload_path, blank=True, null=True, help_text=u'横图') |
|
| 165 | 173 |
url = models.CharField(_(u'url'), max_length=255, blank=True, null=True, help_text=u'链接') |
| 166 | 174 |
|
| 167 |
- image2 = models.ImageField(_(u'image2'), upload_to=upload_path, blank=True, null=True, help_text=u'图片2') |
|
| 175 |
+ image2 = models.ImageField(_(u'image2'), upload_to=upload_path, blank=True, null=True, help_text=u'方图') |
|
| 168 | 176 |
|
| 169 | 177 |
factory_yuan = models.FloatField(_(u'factory_yuan'), default=1000, help_text=u'出厂价(元)') |
| 170 | 178 |
factory_fee = models.IntegerField(_(u'factory_fee'), default=100000, help_text=u'出厂价(分)') |
@@ -267,7 +275,7 @@ class ModelInfo(BaseModelMixin): |
||
| 267 | 275 |
return {
|
| 268 | 276 |
'shot_id': self.model_id, |
| 269 | 277 |
'shot_name': self.shot_member_name, |
| 270 |
- 'shot_image': self.shot_member_image_url, |
|
| 278 |
+ 'shot_image': self.image2_url, |
|
| 271 | 279 |
'integral': self.shot_member_integral, |
| 272 | 280 |
} |
| 273 | 281 |
|
@@ -282,6 +290,7 @@ class ModelInfo(BaseModelMixin): |
||
| 282 | 290 |
'model_uni_name': self.model_uni_name, |
| 283 | 291 |
'model_full_name': self.model_full_name, |
| 284 | 292 |
'model_desc': self.model_descr, |
| 293 |
+ 'model_mount': self.model_mount, |
|
| 285 | 294 |
'shot_type': self.shot_type_id, |
| 286 | 295 |
'shot_name': self.shot_member_name, |
| 287 | 296 |
'shot_type_name': shot_type.shot_type_name |