摘要:
在 app 目录下创建 utils 目录,并创建 auth.py 和 permission.py 文件 auth.py: from rest_framework.authentication import BaseAuthentication from drf import models from 阅读全文
摘要:
views.py: from django.http import JsonResponse from rest_framework.views import APIView ORDER_DICT = { 1: { "commodity": "Phone", "price": 3600, "date 阅读全文
摘要:
在 app 目录下创建 utils 目录,并创建 auth.py auth.py: from rest_framework.authentication import BaseAuthentication # 用于全局认证 class GlobalAuthentication(BaseAuthent 阅读全文