240
-    'default': {
240
+    'faceid': {
241 241
         'appid': '',
242 242
         'secret_id': '',
243 243
         'secret_key': '',
244 244
         'merchant_id': '',
245 245
     },
246
+    'ess': {
247
+        'operator_id': '',
248
+        'template_id': '',
249
+        'secret_id': '',
250
+        'secret_key': '',
251
+        'callback_secret_id': '',
252
+        'callback_secret_key': '',
253
+        'endpoint': 'ess.tencentcloudapi.com',
254
+        'file_endpoint': 'file.ess.tencent.cn',
255
+    },
246 256
 }
247 257
 
248 258
 # 七牛设置
@@ -592,5 +602,9 @@ DEFAULT_START_DATE = '1970-01-02'
592 602
 DEFAULT_END_DATE = '9999-12-03'
593 603
 
594 604
 # 腾讯电子签配置
605
+CONTRACT_LENSMAN_CONTRIBUTION_OPERATOR_ID = 'yDCp3UU055m70lUx6jaTk1RVkiVkKenJ'
595 606
 CONTRACT_LENSMAN_CONTRIBUTION_TEMPLATE_ID = 'yDCp3UU05rgksnUXtZsEvdrK1tRGb7ax'
596
-CONTRACT_LENSMAN_CONTRIBUTION_OPERATOR_ID = 'yDCp3UU055m70lUx6jaTk1RVkiVkKenJ'
607
+CONTRACT_LENSMAN_CONTRIBUTION_SECRET_ID = 'AKIDAHh3WzlYvHqOoR69MI94329FIGEDA62x'
608
+CONTRACT_LENSMAN_CONTRIBUTION_SECRET_KEY = 'tieio5Rn7PqARmJzcAcAh4gNE3rowEc3'
609
+CONTRACT_LENSMAN_CONTRIBUTION_CALLBACK_SECRET_ID = 'F0C875BC8B9442AE8E4769155F812EC0'
610
+CONTRACT_LENSMAN_CONTRIBUTION_CALLBACK_SECRET_KEY = '645CD7B0067B4FCEB6A9A6D589EC9DD6'

+ 27 - 0
utils/tencentcloud/ess.py

@@ -0,0 +1,291 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+import json
4
+
5
+from django.conf import settings
6
+from tencentcloud.common import credential
7
+from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
8
+from tencentcloud.common.profile.client_profile import ClientProfile
9
+from tencentcloud.common.profile.http_profile import HttpProfile
10
+from tencentcloud.ess.v20201111 import ess_client, models
11
+from TimeConvert import TimeConvert as tc
12
+
13
+
14
+tencentcloud_cfg = settings.TENCENTCLOUD.get('ess', {})
15
+operator_id = tencentcloud_cfg.get('operator_id')
16
+template_id = tencentcloud_cfg.get('template_id')
17
+secret_id = tencentcloud_cfg.get('secret_id')
18
+secret_key = tencentcloud_cfg.get('secret_key')
19
+callback_secret_id = tencentcloud_cfg.get('callback_secret_id')
20
+callback_secret_key = tencentcloud_cfg.get('callback_secret_key')
21
+endpoint = tencentcloud_cfg.get('endpoint')
22
+file_endpoint = tencentcloud_cfg.get('file_endpoint')
23
+
24
+
25
+def test_upload_document_files(files, file_type='png'):
26
+    files = [
27
+        {

kodo - Gogs: Go Git Service

Keine Beschreibung

FFIB: 189368f5ed filefield 增加max_length vor 3 Jahren
..
migrations 189368f5ed filefield 增加max_length vor 3 Jahren
__init__.py 627187a7d7 Update Kodo vor 8 Jahren
admin.py eb3484e6c2 后台管理去掉只读 vor 6 Jahren
models.py 189368f5ed filefield 增加max_length vor 3 Jahren
tests.py 627187a7d7 Update Kodo vor 8 Jahren
views.py 627187a7d7 Update Kodo vor 8 Jahren