linhaohong 1 жил өмнө
parent
commit
a1da7b695f

+ 38 - 0
AdminController/CampaignController.py

@@ -130,6 +130,9 @@ class CampaignView(View):
                     'countries': countries,
                     'countries': countries,
                     'device_types': ",".join([device.name for device in campaign.device_type_list]),
                     'device_types': ",".join([device.name for device in campaign.device_type_list]),
                 }
                 }
+                if campaign.image_url == "":
+                    del campaign_data['image_url']
+                    del campaign_data['campaign_url']
                 campaign_list.append(campaign_data)
                 campaign_list.append(campaign_data)
 
 
             data = {
             data = {
@@ -563,3 +566,38 @@ class CampaignView(View):
             regin = 1
             regin = 1
             AWS_SES_ACCESS_REGION = 'us-east-1'
             AWS_SES_ACCESS_REGION = 'us-east-1'
         return s3_url, regin, AWS_SES_ACCESS_REGION
         return s3_url, regin, AWS_SES_ACCESS_REGION
+
+#                                ,#.
+#                              .[[[&[[;   ,&&,
+#                              &# ,[;,&; [[[[[[:
+#                            [[   :[&,&[#;i[[,[,
+#                        ;#i [   L@$[&[#&[[   .[
+#                      i[[[[[[   @@$.#[#&$$$   [;
+#                     ,[,,,;;&   i$$  [  @@$   &&
+#                     [i;,,,;[,       [  $$#   [[i:#[#
+#                     [,,,,,,#&.     &[,       &&[[&[[
+#                     [,,,,,,,&[[&i[[[#[      [&;,;[[&
+#                     [,,,,,,,,,&&[&;,,&[[&;[[[,,,,;[[
+#                     &;,,,,,,,,,,,,,,,;,#[[&,,,;,,;,[[#
+#                     i[,,,,,,,,,,,,,,,,,,,,,,;,;,,,,[[&:
+#                      [;,,,,,,,,,,,,,,,,,,,,,&,;,,,,#[[
+#                       [;,;,,,,,,,,,,,,,,,,,;[,;,,,,;[
+#                       ;[#;,,,,,,,,,,,,,,,,,i&,,,,,,i[
+#                        :&[i;,,,,,,,,,,,,,;,[&,;,,,,#[i
+#                          [[[[i,,,,,,,;,;&[&&&&,,,,,[[[
+#                           &;[[[[&[[&[&[&&&,,,&[,,,,[[[
+#                           :&i,;,ii##i;,,,;;,,;;,,;[[i
+#                         &[[&[[[,;,,,,,,,,,,,,,,,,[[&,
+#                        &[,,,;[[,,,,,,,,,,,,,,,,;[[&&[[
+#                        [,,,,[[,;,,,,,,,,,,,,,,,,,,,,;[[
+#                        [,,;;[;,,,,,,,,,,,,,,,,,,[[;,,,[
+#                        [i;#[[;,,,,,,,,,,,,,,,,;[[;,,,;[
+#                        &[,,&#,,,,,,,,,,,,,,,,,,[;;,,,[[
+#                         [[&&,;,,,,,,,,,,,,,,,,,[;;;[[[
+#                           [[,;,,,,,,,,,,,,,,,,,[#;#&
+#                           &[,,,,,,,,,,,,,,,,,,,,[[[&
+#                            [,,,,,,,,,,,,,,,,,,,,,,[[[
+#                            [,,,,,,,,,,,,,,,,,,;,,;[[:
+#                            &;,,,,,,,,,,,,,,,,,;,,,;[
+#                                    鳄鱼保佑
+#                                   代码无BUG!