Merge branch 'tamron' of git.xfoto.com.cn:Kodo/kodo into tamron

huangqimin001 преди 2 години
родител
ревизия
9b2c5fde81
променени са 3 файла, в които са добавени 39 реда и са изтрити 1 реда
  1. 18 0
      member/migrations/0046_alter_memberactivitycontributionwelfareunlockinginfo_unique_together.py
  2. 15 0
      member/migrations/0048_merge_20221027_2056.py
  3. 6 1
      member/models.py

+ 18 - 0
member/migrations/0046_alter_memberactivitycontributionwelfareunlockinginfo_unique_together.py

@@ -0,0 +1,18 @@
1
+# -*- coding: utf-8 -*-
2
+# Generated by Django 3.2.8 on 2022-10-27 09:15
3
+
4
+from django.db import migrations
5
+
6
+
7
+class Migration(migrations.Migration):
8
+
9
+    dependencies = [
10
+        ('member', '0045_auto_20221026_2102'),
11
+    ]
12
+
13
+    operations = [
14
+        migrations.AlterUniqueTogether(
15
+            name='memberactivitycontributionwelfareunlockinginfo',
16
+            unique_together={('activity_id', 'welfare_id', 'user_id')},
17
+        ),
18
+    ]

+ 15 - 0
member/migrations/0048_merge_20221027_2056.py

@@ -0,0 +1,15 @@
1
+# -*- coding: utf-8 -*-
2
+# Generated by Django 3.2.8 on 2022-10-27 12:56
3
+
4
+from django.db import migrations
5
+
6
+
7
+class Migration(migrations.Migration):
8
+
9
+    dependencies = [
10
+        ('member', '0046_alter_memberactivitycontributionwelfareunlockinginfo_unique_together'),
11
+        ('member', '0047_memberactivitycontributionwelfareunlockinginfo_welfare_type'),
12
+    ]
13
+
14
+    operations = [
15
+    ]

+ 6 - 1
member/models.py

@@ -369,7 +369,7 @@ class MemberActivityInfo(BaseModelMixin, BrandInfoMixin):
369 369
     is_slider = models.BooleanField(_(u'is_slider'), default=True, help_text=u'是否为轮播活动')
370 370
     slider_image = models.ImageField(_(u'slider_image'), upload_to=upload_path, blank=True, help_text=u'活动轮播图片')
371 371
     cover = models.ImageField(_(u'cover'), upload_to=upload_path, blank=True, help_text=u'活动列表图片')
372
-    limit_image_num = models.IntegerField(_(u'limit_image_num'), default=3, help_text=u'限制图片数量')
372
+    limit_image_num = models.IntegerField(_(u'limit_image_num'), default=0, help_text=u'限制图片数量')
373 373
     image = models.ImageField(_(u'image'), upload_to=upload_path, blank=True, help_text=u'活动内容图片')
374 374
 
375 375
     content_rich_text = RichTextField(_(u'content_rich_text'), blank=True, default='', help_text=u'活动描述')
@@ -827,6 +827,10 @@ class MemberActivityContributionWelfareUnlockingInfo(BaseModelMixin, BrandInfoMi
827 827
         verbose_name = _(u'会员活动投稿福利解锁信息')
828 828
         verbose_name_plural = _(u'会员活动投稿福利解锁信息')
829 829
 
830
+        unique_together = (
831
+            ('activity_id', 'welfare_id', 'user_id'),
832
+        )
833
+
830 834
     def __unicode__(self):
831 835
         return '%d' % self.pk
832 836
 
@@ -851,4 +855,5 @@ class MemberActivityContributionWelfareUnlockingInfo(BaseModelMixin, BrandInfoMi
851 855
             'address': self.address,
852 856
             'tracking_number': self.tracking_number,
853 857
             'is_handled': self.is_handled,
858
+            'created_at': tc.local_string(utc_dt=self.created_at),
854 859
         }