|
@@ -8,12 +8,11 @@
|
|
"""
|
|
"""
|
|
import logging
|
|
import logging
|
|
import time
|
|
import time
|
|
-from Ansjer.config import ACCESS_KEY_ID, SECRET_ACCESS_KEY, REGION_NAME, PUSH_BUCKET
|
|
|
|
|
|
+
|
|
from django.db import transaction
|
|
from django.db import transaction
|
|
from django.views import View
|
|
from django.views import View
|
|
|
|
|
|
from Model.models import DeviceCloudPhotoInfo, Device_Info, CloudPhotoBGM
|
|
from Model.models import DeviceCloudPhotoInfo, Device_Info, CloudPhotoBGM
|
|
-from Object.AWS.AmazonS3Util import AmazonS3Util
|
|
|
|
from Object.ResponseObject import ResponseObject
|
|
from Object.ResponseObject import ResponseObject
|
|
from Object.TokenObject import TokenObject
|
|
from Object.TokenObject import TokenObject
|
|
|
|
|
|
@@ -79,8 +78,7 @@ class CronCloudPhotoView(View):
|
|
"""
|
|
"""
|
|
获取背景音乐列表
|
|
获取背景音乐列表
|
|
"""
|
|
"""
|
|
- photo_bgm = CloudPhotoBGM.objects.filter(is_show=1).values('name')
|
|
|
|
|
|
+ photo_bgm = CloudPhotoBGM.objects.filter(is_show=1).values('name', 'link').order_by('sort')
|
|
if not photo_bgm.exists():
|
|
if not photo_bgm.exists():
|
|
return response.json(0, [])
|
|
return response.json(0, [])
|
|
- AmazonS3Util(ACCESS_KEY_ID, SECRET_ACCESS_KEY, REGION_NAME)
|
|
|
|
- return response.json(0, [])
|
|
|
|
|
|
+ return response.json(0, list(photo_bgm))
|