synthea_webservice/webservice/apps/synthea/api/serializers.py

8 lines
242 B
Python

from rest_framework import serializers
from apps.synthea.models import Synthea
class SyntheaSerializer(serializers.ModelSerializer):
class Meta:
model = Synthea
fields = ['state', 'population', 'gender', 'age', 'module']