Skip to content

Instantly share code, notes, and snippets.

@guilhermecarvalhocarneiro
Created January 6, 2021 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guilhermecarvalhocarneiro/d0cd80ed659047ead2943e6bdadcd743 to your computer and use it in GitHub Desktop.
Save guilhermecarvalhocarneiro/d0cd80ed659047ead2943e6bdadcd743 to your computer and use it in GitHub Desktop.
class AgendamentoSerializer(FieldsListSerializerMixin, ModelSerializer):
fk_profissional = ProfissionalSerializer(read_only=True)
fk_cliente = ClienteSerializer(read_only=True)
fk_servico = ServicoSerializer(read_only=True)
etapa_display = CharField(source="get_etapa_display", read_only=True, allow_null=True, allow_blank=True)
class Meta:
model = Agendamento
fields = '__all__'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment