From a8477ce63ebcd9bcf24bd7d17688c886a9f54df2 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 21 Feb 2025 18:12:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E5=8D=87=E7=BA=A7=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4d2fefe..84144be 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,22 +1,22 @@ -celery==5.2.3 -Django==3.2.12 -django-celery-beat==2.3.0 -django-celery-results==2.4.0 -django-cors-headers==3.11.0 -django-filter==21.1 -djangorestframework==3.13.1 -djangorestframework-simplejwt==5.1.0 -drf-yasg==1.21.3 -psutil==5.9.0 -redis==4.4.0 -django-redis==5.2.0 +celery==5.4.0 +Django==4.2.19 +django-celery-beat==2.7.0 +django-celery-results==2.5.1 +django-cors-headers==4.7.0 +django-filter==25.1 +djangorestframework==3.15.2 +djangorestframework-simplejwt==5.4.0 +drf-yasg==1.21.8 +psutil==7.0.0 +redis==5.2.1 +django-redis==5.4.0 user-agents==2.2.0 -daphne==4.0.0 -channels-redis==4.0.0 -django-restql==0.15.2 -requests==2.28.1 +daphne==4.1.2 +channels-redis==4.2.1 +django-restql==0.16.2 +requests==2.32.3 xlwt==1.3.0 -openpyxl==3.1.0 -cron-descriptor==1.2.35 -docxtpl==0.16.7 +openpyxl==3.1.5 +cron-descriptor==1.4.5 +docxtpl==0.19.1 # deepface==0.0.79 From 434002ba98d5c35984cae361fd924313e4b59720 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 21 Feb 2025 18:13:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E9=9D=9E=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E5=8C=85=E5=90=8E=E7=BB=AD=E5=9C=A8=E5=87=BD=E6=95=B0=E4=B8=AD?= =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/utils/sms.py | 4 ++-- apps/utils/views.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/utils/sms.py b/apps/utils/sms.py index f6b3dba..31a8724 100644 --- a/apps/utils/sms.py +++ b/apps/utils/sms.py @@ -1,5 +1,3 @@ -from aliyunsdkcore.client import AcsClient -from aliyunsdkcore.request import CommonRequest import json import logging from server.settings import get_sysconfig @@ -10,6 +8,8 @@ myLogger = logging.getLogger('log') @auto_log(name='阿里云短信', raise_exception=True, send_mail=True) def send_sms(phone: str, template_code: int, template_param: dict): + from aliyunsdkcore.client import AcsClient + from aliyunsdkcore.request import CommonRequest config = get_sysconfig() if config.get("sms", {}).get('enabled', True) is False: return diff --git a/apps/utils/views.py b/apps/utils/views.py index a8f8194..968733b 100755 --- a/apps/utils/views.py +++ b/apps/utils/views.py @@ -1,10 +1,8 @@ import os -import cv2 from django.http import HttpResponse from apps.utils.errors import SIGN_MAKE_FAIL from server.settings import BASE_DIR -import numpy as np from rest_framework.response import Response from rest_framework.exceptions import ParseError from apps.utils.viewsets import CustomGenericViewSet @@ -29,6 +27,8 @@ class SignatureViewSet(CustomCreateModelMixin, CustomGenericViewSet): 照片生成透明签名图片 """ + import cv2 + import numpy as np path = (BASE_DIR + request.data['path']).replace('\\', '/') try: image = cv2.imread(path, cv2.IMREAD_UNCHANGED)