Created
April 12, 2020 20:56
-
-
Save bismarck4lves/5d8d2f97200087b0c0bb784fd92fc9df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MarcacaoSerializer(serializers.ModelSerializer): | |
agenda = AgendasSerializer() | |
class Meta: | |
model = Consultas | |
fields = ['id', 'agenda', 'horario', 'data_agendamento'] | |
def create(self, validated_data): | |
# validacoes ... | |
payload = { | |
"agenda_id": 1, | |
"horario": "02:04" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment