six_005
This commit is contained in:
+3
-3
@@ -16,7 +16,6 @@ from rest_framework.viewsets import ViewSet
|
||||
|
||||
from django_jwt_token.jwt认证接口 import Jwt身份认证
|
||||
from sixGuoDjango import BaseResponse, ResData, redis_5
|
||||
from wechat_token.token工具包 import sixToken
|
||||
|
||||
default_channel_layer = cast(BaseChannelLayer, get_channel_layer(alias="default"))
|
||||
|
||||
@@ -37,7 +36,7 @@ def sync_lock(lock):
|
||||
|
||||
|
||||
class DemoXiaoViewSets(ViewSet):
|
||||
lock = threading.Lock() # 所有请求 共享这一个 lock对象
|
||||
lock_sync_lock = threading.Lock() # 所有请求 共享这一个 lock对象
|
||||
|
||||
@action(detail=False, methods=["get", "post", "put", "delete"], url_path="zizi")
|
||||
def 只用于初始化项目测试接口(self, request: Request):
|
||||
@@ -103,7 +102,8 @@ class DemoXiaoViewSets(ViewSet):
|
||||
@action(detail=False, methods=["get", "post", "put", "delete"], url_path="中文", )
|
||||
def 中文(self, request: Request):
|
||||
xiaozizi = request.data.get("xiaozizi", None)
|
||||
return Response(data={"msg": xiaozizi})
|
||||
print(xiaozizi)
|
||||
return Response(data={"data_uri": "0909090"}, status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
DemoXiaoViewSetsDemoRouter = DefaultRouter()
|
||||
|
||||
Reference in New Issue
Block a user