serializer.py 425 B

1234567891011121314151617
  1. from rest_framework import serializers
  2. from treeAndTable.models import Dept_job, Dept_job_user
  3. class Dept_Job_Serializer(serializers.ModelSerializer):
  4. class Meta:
  5. model = Dept_job
  6. # 全部都包含的意思
  7. fields = '__all__'
  8. class DeptJobUserSerializer(serializers.ModelSerializer):
  9. class Meta:
  10. model = Dept_job_user
  11. # 全部都包含的意思
  12. fields = '__all__'