目录
uuid
什么是UUID
UUID 是指(Universally Unique Identifier)通用唯一识别码
图片验证码生成与展示
后端
1.导包
from rest_framework.views import APIView
from rest_framework.response import Response
from .models import User
import re,random,redis,string
from django.http import HttpResponse
from captcha.image import ImageCaptcha
2.视图
class ImgCode(APIView):
def get(self,request,uuid):
img_code=""