perf: 修改支持 Django4

This commit is contained in:
ibuler
2023-07-24 11:52:25 +08:00
parent 16660575b7
commit b4b9c805ff
243 changed files with 546 additions and 614 deletions

View File

@@ -1,12 +1,12 @@
from typing import Iterable, AnyStr
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from rest_framework.exceptions import APIException
from users.utils import construct_user_email
from common.utils.common import get_logger
from common.sdk.im.utils import digest, update_values
from common.sdk.im.mixin import RequestMixin, BaseRequest
from common.sdk.im.utils import digest, update_values
from common.utils.common import get_logger
from users.utils import construct_user_email
logger = get_logger(__name__)
@@ -112,13 +112,13 @@ class WeCom(RequestMixin):
update_values(extra_params, kwargs)
body = {
"touser": '|'.join(users),
"msgtype": "text",
"agentid": self._agentid,
"text": {
"content": msg
},
**extra_params
"touser": '|'.join(users),
"msgtype": "text",
"agentid": self._agentid,
"text": {
"content": msg
},
**extra_params
}
if markdown:
body['msgtype'] = 'markdown'
@@ -184,4 +184,3 @@ class WeCom(RequestMixin):
return {
'username': username, 'name': name, 'email': email
}