serializer.py 377 B

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