def image_url(self):
138 142
         return upload_file_url(self.image)
139 143
 
@@ -158,6 +162,18 @@ class ModelInfo(BaseModelMixin):
158 162
         # imgs = ModelImageInfo.objects.filter(model_id=self.model_id, status=True)
159 163
         # return [img.data for img in imgs]
160 164
 
165
+    @property
166
+    def admindata(self):
167
+        return {
168
+            'model_id': self.model_id,
169
+            'model_name': self.model_name,
170
+            'model_full_name': self.model_full_name,
171
+            'image_path': self.image_path,
172
+            'image_url': self.image_url,
173
+            'factory_yuan': self.factory_yuan,
174
+            'integral': self.integral,
175
+        }
176
+
161 177
 
162 178
 class ModelImageInfo(BaseModelMixin):
163 179
     model_id = models.CharField(_(u'model_id'), max_length=32, blank=True, null=True, help_text=u'型号唯一标识', db_index=True)

+ 1 - 1
requirements.txt

@@ -15,7 +15,7 @@ django-json-render==1.0.0
15 15
 django-json-response==1.1.5
16 16
 django-logit==1.1.2
17 17
 django-mobi==0.1.7
18
-django-models-ext==1.1.4
18
+django-models-ext==1.1.6
19 19
 django-multidomain==1.1.4
20 20
 django-paginator2==1.0.3
21 21
 django-redis-connector==1.0.1

Pai2/pai2 - Gogs: Go Git Service

583 Commits (bca4e645fe9dc0219df51c64317633fe693a57d7)

Author SHA1 Message Date
  Brightcells ad503a9078 User should not see photo of group which groupuser is false at home 8 years ago
  Brightcells c9777aeb64 Fix Bug: tuple index out of range 8 years ago
  Brightcells 14d5d63e3b Add nomark/origin price for GroupPhotoInfo 8 years ago
  Brightcells 22b9954f45 Update settings 8 years ago
  Brightcells fd92583a9a Remove usage of records 8 years ago
  Brightcells 4419cbf2d9 Fix Bug: upload fail when photo.name the same within 60 seconds 8 years ago
  Brightcells 38817ceb17 Separate flyimg_list_api from flyimg_upload_api 8 years ago
  Brightcells ba2c19f73e Change rawsql pk to photo_id 8 years ago
  Brightcells b6ab791315 Change relative pk to photo_id 8 years ago
  Brightcells 840173dc6b Filter photo_id use photo_id field in group_photo_detail 8 years ago
  Brightcells 6dfe58d449 Add photo_id for list_display in GroupPhotoInfoAdmin 8 years ago
  Brightcells 3c6e34823b Add photo_id for GroupPhotoInfo replaced pk 8 years ago
  Brightcells 4547c709bf Add api get_server_time_api 8 years ago
  Brightcells e8cd9652b7 Add gather_screenshot for api tg_group_gather_start_api 8 years ago
  Brightcells 1ecd4f276f Remove status code NO_XX_PERMISSION 8 years ago
  Brightcells 505b2802c5 Change to fixed price 8 years ago
  Brightcells d824fbd441 Add photo_md5 for GroupPhotoInfo 8 years ago
  Brightcells 6611483294 Fix Bug: Group Photo Not Empty 8 years ago
  Brightcells fd73524af1 Add api group_delete_api 8 years ago
  Brightcells f6bdf82918 Set group info after photo upload & Add group photo num in group info 8 years ago
  Brightcells 95be9f6b91 Set group.PhotoCommentInfo ==> comment utf8mb4 8 years ago
  Brightcells 136346961f Fix Bug: UnboundLocalError at /s/join -- local variable 'group_photo' referenced before assignment 8 years ago
  Brightcells 2eba3ed7f9 Add guest login for tourguide 8 years ago
  Brightcells 7bcf74b5da ACTIVE_GROUP_NOT_FOUND 8 years ago
  Brightcells a62888a984 Fix Bug: _in => __in 8 years ago
  Brightcells 5ebf9b60ba have_active_group 8 years ago
  Brightcells b27a2f135c Fix Bug: check whether have tour goup or not error 8 years ago
  Brightcells 882848b93f Disable actions by actions=None 8 years ago
  Brightcells a3ae7a664c Update requirements.txt 8 years ago
  Brightcells 6279e898c4 Override delete_selected by using django-admin==1.0.1 8 years ago
  Brightcells 84163f001e Fix Bug: file_path.url 8 years ago
  Brightcells c98fa4a4ed upload_file_url 8 years ago
  Brightcells a7b59d4389 Redis' set/setex/get => RedisExtensions' setjson/setexjson/getjson 8 years ago
  Brightcells 4f87058e1c Add patch_api 8 years ago
  Brightcells f63cce369a Update requirements.txt 8 years ago
  Brightcells 0e7b5eb1af Update order_by of group session photos 8 years ago
  Brightcells ba179547b1 Change to use pysnippets 8 years ago
  Brightcells 356bc17051 isort 8 years ago
  Brightcells e7f3abdf56 Add admin relative api 8 years ago
  Brightcells 22cbf27523 Recall tg_group_transfer_api 8 years ago
  Brightcells ae0ac478f3 set_tour_guide_own_group in tg_group_transfer_api 8 years ago
  Brightcells 3b745fc07a Change to get_tour_guide_own_group when group_id not exists 8 years ago
  Brightcells bcb6e8c9ca Filter status=True 8 years ago
  Brightcells 5ec8568418 Remove unused import lib 8 years ago
  Brightcells 385f4c5143 from StatusCode import StatusCodeField 8 years ago
  Brightcells d06c19c1d5 Fix Bug: photo_watermark_path 8 years ago
  Brightcells 962dfeef0a WECHAT_OAUTH2_RETRY_REDIRECT_URI 8 years ago
  Brightcells d4c2c2a8d7 Change to use pywe-response 8 years ago
  Brightcells c3e3681541 Create user in api get_userinfo_api for weapp 8 years ago
  Brightcells f183c19ae8 Limit return quota num for flyimg 8 years ago