# from rest_framework import serializers # # from .models import WebNews # from PIL import Image # # class WebNewsModelSerializer(serializers.ModelSerializer): # # haha = serializers.CharField(max_length=10,min_length=1,label="测试字段") # # class Meta: # # 1,参考BookInfo,生成序列化器的字段 # model = WebNews # fields = '__all__'