from rest_framework import serializers from treeAndTable.models import Dept_job class Dept_Job_Serializer(serializers.ModelSerializer): class Meta: model = Dept_job # 全部都包含的意思 fields = '__all__'