|
@@ -4,18 +4,19 @@ import base64
|
|
import datetime
|
|
import datetime
|
|
import json
|
|
import json
|
|
import logging
|
|
import logging
|
|
|
|
+import ssl
|
|
import sys
|
|
import sys
|
|
import time
|
|
import time
|
|
-import jwt
|
|
|
|
from decimal import Decimal
|
|
from decimal import Decimal
|
|
from itertools import groupby
|
|
from itertools import groupby
|
|
from operator import itemgetter
|
|
from operator import itemgetter
|
|
from urllib.parse import quote, parse_qs, unquote
|
|
from urllib.parse import quote, parse_qs, unquote
|
|
|
|
|
|
import boto3
|
|
import boto3
|
|
|
|
+import jwt
|
|
import paypalrestsdk
|
|
import paypalrestsdk
|
|
from django.db import transaction
|
|
from django.db import transaction
|
|
-from django.db.models import Q, F, Count
|
|
|
|
|
|
+from django.db.models import Q, F
|
|
from django.http import JsonResponse, HttpResponseRedirect, HttpResponse
|
|
from django.http import JsonResponse, HttpResponseRedirect, HttpResponse
|
|
from django.views.generic.base import View
|
|
from django.views.generic.base import View
|
|
|
|
|
|
@@ -41,6 +42,9 @@ from Service.CommonService import CommonService
|
|
from Service.PayService import PaymentService
|
|
from Service.PayService import PaymentService
|
|
from Service.VodHlsService import SplitVodHlsObject
|
|
from Service.VodHlsService import SplitVodHlsObject
|
|
|
|
|
|
|
|
+ssl._create_default_https_context = ssl._create_unverified_context
|
|
|
|
+LOGGER = logging.getLogger('info')
|
|
|
|
+
|
|
|
|
|
|
# 设备信息添加
|
|
# 设备信息添加
|
|
class CloudStorageView(View):
|
|
class CloudStorageView(View):
|
|
@@ -393,7 +397,7 @@ class CloudStorageView(View):
|
|
"Effect": "Allow",
|
|
"Effect": "Allow",
|
|
"Action": "s3:*",
|
|
"Action": "s3:*",
|
|
"Resource": ["{aws_arn}:::{bucket_name}/{uid_channel}*".
|
|
"Resource": ["{aws_arn}:::{bucket_name}/{uid_channel}*".
|
|
- format(aws_arn=aws_arn, bucket_name=bucket_name, uid_channel=storage)]
|
|
|
|
|
|
+ format(aws_arn=aws_arn, bucket_name=bucket_name, uid_channel=storage)]
|
|
}
|
|
}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
@@ -1982,5 +1986,6 @@ class CloudStorageView(View):
|
|
order_qs.update(**update_dict)
|
|
order_qs.update(**update_dict)
|
|
return response.json(0)
|
|
return response.json(0)
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
|
+ LOGGER.info('异常详情,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
print(e)
|
|
print(e)
|
|
return response.json(500, repr(e))
|
|
return response.json(500, repr(e))
|