- # 序列号定义
- from django.contrib.auth.models import User
- from rest_framework import serializers
- from rest_framework.serializers import ListSerializer
- from routes.models import Route
- class RoutesSerializer(serializers.ModelSerializer):
- class Meta:
- model = Route
- list_serializer = ListSerializer
- fields = '__all__'
|