标签:end art pre 创建序列 field time rest ram start
from rest_framework import serializers from .models import Coupon, UserCoupon class CouponModelSerializer(serializers.ModelSerializer): class Meta: model = Coupon fields = ("name","coupon_type","condition","sale") class UserCouponModelSerializer(serializers.ModelSerializer): coupon = CouponModelSerializer() class Meta: model = UserCoupon fields = ("id","start_time","end_time","now_time","coupon")
标签:end art pre 创建序列 field time rest ram start
原文地址:https://www.cnblogs.com/jalen-123/p/13193289.html