models

Modelos do submódulo de solicitações de dieta especial.

Define o modelo central SolicitacaoDietaEspecial, os catálogos de apoio (motivos de negação, motivos de alteração de U.E., alergias e intolerâncias, classificações de dieta), o Anexo e a view não gerenciada SolicitacoesDietaEspecialAtivasInativasPorAluno.

As listas de constantes no topo do módulo agrupam os eventos de log (LogSolicitacoesUsuario) que caracterizam cada situação da solicitação (pendente, autorizada, negada ou cancelada).

SolicitacaoDietaEspecial

Modelo central do módulo de dieta especial. Representa a solicitação de dieta especial de um aluno, passando por um fluxo de autorização que envolve a escola e a CODAE. Pode ser uma inclusão comum, alteração de U.E., cancelamento de dieta ou solicitação para aluno não matriculado.

class SolicitacaoDietaEspecial(*args, **kwargs)[source]

Bases: ExportModelOperationsMixin('dieta_especial'), TemChaveExterna, CriadoEm, CriadoPor, FluxoDietaEspecialPartindoDaEscola, TemPrioridade, Logs, TemIdentificadorExternoAmigavel, Ativavel

Solicitação de dieta especial de um aluno.

Modelo central do módulo de dieta especial. Representa a solicitação de dieta especial de um aluno e percorre um fluxo de autorização que envolve a escola e a CODAE. Pode ser uma inclusão comum, uma alteração de U.E., um cancelamento de dieta ou uma solicitação para aluno não matriculado.

ALTERACAO_UE = 'ALTERACAO_UE'
ALUNO_NAO_MATRICULADO = 'ALUNO_NAO_MATRICULADO'
CANCELAMENTO_DIETA = 'CANCELAMENTO_DIETA'
COMUM = 'COMUM'
property DESCRICAO: str

Retorna a descrição legível da solicitação conforme o status atual.

Returns:

Texto no formato "Dieta Especial - {descricao}", ou "Dieta Especial" quando não há descrição mapeada.

Return type:

str

DESCRICAO_SOLICITACAO = {'CODAE_AUTORIZADO': 'Autorizada', 'CODAE_AUTORIZOU_INATIVACAO': 'Cancelamento Autorizado', 'CODAE_A_AUTORIZAR': 'Solicitação de Inclusão', 'CODAE_NEGOU_INATIVACAO': 'Negada o Cancelamento', 'CODAE_NEGOU_PEDIDO': 'Negada a Inclusão', 'ESCOLA_CANCELOU': 'Cancelada pela Unidade Escolar', 'ESCOLA_SOLICITOU_INATIVACAO': 'Solicitação de Cancelamento'}
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

TIPO_SOLICITACAO_CHOICES = [('COMUM', 'Comum'), ('ALUNO_NAO_MATRICULADO', 'Aluno não matriculado'), ('ALTERACAO_UE', 'Alteração U.E'), ('CANCELAMENTO_DIETA', 'Cancelamento de dieta especial')]
alergias_intolerancias

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

aluno

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

aluno_id
property aluno_json: dict

Retorna os dados do aluno serializados.

Returns:

Dicionário com os dados do aluno retornados pelo AlunoSerializer.

Return type:

dict

classmethod aluno_possui_dieta_especial_autorizada_alteracao_ue_recreio_ferias(aluno, dieta_alterada, motivo_recreio_ferias)[source]

Verifica se o aluno já possui alteração de U.E. autorizada para recreio nas férias.

Parameters:
  • aluno (Aluno) – Aluno a verificar.

  • dieta_alterada (SolicitacaoDietaEspecial) – Dieta alterada (solicitação original).

  • motivo_recreio_ferias (MotivoAlteracaoUE) – Motivo de alteração de U.E. de recreio nas férias.

Returns:

True se já existir alteração de U.E. autorizada com o motivo informado; False caso contrário.

Return type:

bool

classmethod aluno_possui_dieta_especial_pendente(aluno)[source]

Verifica se o aluno possui alguma dieta especial pendente de autorização.

Parameters:

aluno (Aluno) – Aluno a verificar.

Returns:

True se existir dieta especial com status CODAE_A_AUTORIZAR; False caso contrário.

Return type:

bool

anexo_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

property anexos: QuerySet

Retorna os anexos associados à solicitação.

Returns:

Queryset com os anexos da solicitação.

Return type:

QuerySet[Anexo]

ativo

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

cancelar_aluno_mudou_escola

NoOp function, ignores all arguments.

cancelar_aluno_nao_pertence_rede

NoOp function, ignores all arguments.

cancelar_pedido

NoOp function, ignores all arguments.

caracteristicas_do_alimento

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

classificacao

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

classificacao_id
clean()[source]

Valida os campos da solicitação antes de salvar.

Raises:

ValidationError – Se a dieta for para recreio nas férias e não possuir período preenchido, ou se a data final for anterior à data inicial.

Return type:

None

codae_autoriza

NoOp function, ignores all arguments.

codae_autoriza_inativacao

NoOp function, ignores all arguments.

codae_nega

NoOp function, ignores all arguments.

codae_nega_inativacao

NoOp function, ignores all arguments.

conferido

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

cria_anexos_inativacao(anexos)[source]

Cria os anexos de laudo de alta para a inativação da dieta.

Parameters:

anexos (list[dict[str, Any]]) – Lista de anexos, em que cada item possui as chaves base64 (conteúdo do arquivo) e nome (nome do arquivo).

Raises:

AssertionError – Se anexos não for uma lista não vazia.

Return type:

None

criado_em

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

criado_por

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

criado_por_id
data_inicio

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

data_termino

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property data_ultimo_log: str | None

Retorna a data do último log da solicitação.

Returns:

Data formatada DD/MM/AAAA do último log, ou None se não houver logs.

Return type:

str | None

dieta_alterada

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

dieta_alterada_id
dieta_para_recreio_ferias

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

dietas_especiais

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

property display_nutricionista_with_registro_funcional: str

Retorna o nome do nutricionista que autorizou a dieta, com registro funcional.

Returns:

Texto "Elaborado por {nome} - RF {registro}" ou, quando o usuário não possui registro funcional, o registro funcional informado na solicitação.

Return type:

str

eh_importado

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property escola: Escola | None

Retorna a escola vinculada ao rastro da solicitação.

Returns:

Escola associada ao rastro da solicitação, ou None se não houver rastro.

Return type:

Escola | None

escola_destino

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

escola_destino_id
property get_log_autorizado: LogSolicitacoesUsuario | None

Retorna o log de autorização da solicitação, se existir.

Returns:

Log de autorização (CODAE_AUTORIZOU ou CODAE_AUTORIZOU_ALTERACAO_UE_DIETA_ESPECIAL), ou None se a solicitação ainda não foi autorizada.

Return type:

LogSolicitacoesUsuario | None

get_next_by_criado_em(*, field=<django.db.models.fields.DateTimeField: criado_em>, is_next=True, **kwargs)
get_previous_by_criado_em(*, field=<django.db.models.fields.DateTimeField: criado_em>, is_next=False, **kwargs)
get_status_display(*, field=<django_xworkflows.models.StateField: status>)
get_tipo_solicitacao_display(*, field=<django.db.models.fields.CharField: tipo_solicitacao>)
classmethod get_totais_gerencial_dietas(queryset=None)[source]

Calcula os totais gerenciais de dietas (solicitadas e por situação).

Parameters:

queryset (QuerySet[SolicitacaoDietaEspecial] | None) – Queryset opcional de solicitações. Se None, usa todas as solicitações.

Returns:

Dicionário com os totais de solicitações, autorizadas, negadas e canceladas.

Return type:

dict[str, int]

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

informacoes_adicionais

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

inicia_fluxo

NoOp function, ignores all arguments.

inicia_fluxo_inativacao

NoOp function, ignores all arguments.

justificativa_negacao

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

motivo_alteracao_ue

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

motivo_alteracao_ue_id
motivo_negacao

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

motivo_negacao_id
negar_cancelamento_pedido

NoOp function, ignores all arguments.

nome_completo_pescritor

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nome_protocolo

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property numero_alunos: str

Retorna a quantidade de alunos associada à solicitação.

Returns:

String vazia (mantida por compatibilidade com o serializer).

Return type:

str

objects = <django.db.models.manager.Manager object>
observacoes

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

observacoes_alteracao

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

orientacoes_gerais

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

protocolo_padrao

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

protocolo_padrao_id
classmethod quantidade_solicitacoes_que_ja_estiveram_autorizadas(solicitacoes)[source]

Conta quantas solicitações do queryset já estiveram autorizadas.

Parameters:

solicitacoes (QuerySet[SolicitacaoDietaEspecial]) – Queryset de solicitações a analisar.

Returns:

Quantidade de solicitações que já estiveram autorizadas.

Return type:

int

classmethod quantidade_solicitacoes_que_ja_estiveram_canceladas(solicitacoes)[source]

Conta quantas solicitações do queryset já estiveram canceladas.

Considera apenas solicitações do tipo ALTERACAO_UE e COMUM.

Parameters:

solicitacoes (QuerySet[SolicitacaoDietaEspecial]) – Queryset de solicitações a analisar.

Returns:

Quantidade de solicitações que já estiveram canceladas.

Return type:

int

classmethod quantidade_solicitacoes_que_ja_estiveram_negadas(solicitacoes)[source]

Conta quantas solicitações do queryset já estiveram negadas.

Parameters:

solicitacoes (QuerySet[SolicitacaoDietaEspecial]) – Queryset de solicitações a analisar.

Returns:

Quantidade de solicitações que já estiveram negadas.

Return type:

int

classmethod quantidade_solicitacoes_que_ja_estiveram_pendentes(solicitacoes)[source]

Conta quantas solicitações do queryset já estiveram pendentes.

Parameters:

solicitacoes (QuerySet[SolicitacaoDietaEspecial]) – Queryset de solicitações a analisar.

Returns:

Quantidade de solicitações que já estiveram pendentes.

Return type:

int

rastro_dre

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

rastro_dre_id
rastro_escola

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

rastro_escola_id
rastro_lote

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

rastro_lote_id
rastro_terceirizada

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

rastro_terceirizada_id
registro_funcional_nutricionista

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

registro_funcional_pescritor

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

salvar_log_transicao(status_evento, usuario, **kwargs)[source]

Registra um log de transição de status da solicitação.

Parameters:
  • status_evento (int) – Evento de log (transição de status) a gravar.

  • usuario (perfil.Usuario) – Usuário responsável pela transição.

  • **kwargs (Any) – Argumentos extras. Aceita justificativa (str) para a transição.

Return type:

None

sistema_cancela_aluno_encerramento_matricula

NoOp function, ignores all arguments.

solicitacaodietaespecial_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

solicitacoes_cadastro_produto

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

status = <src.dados_comuns.fluxo_status.DietaEspecialWorkflow object>
property str_dre_lote_escola: str

Monta uma string legível com DRE, lote e escola de destino.

Returns:

Texto no formato "DRE X - LOTE - ESCOLA", usando "SEM DRE", "SEM LOTE" e "SEM ESCOLA" quando os dados não estiverem disponíveis.

Return type:

str

substituicaoalimento_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

property substituicoes: QuerySet

Retorna as substituições de alimento associadas à solicitação.

Returns:

Queryset de SubstituicaoAlimento.

Return type:

QuerySet

terceirizada_toma_ciencia

NoOp function, ignores all arguments.

terceirizada_toma_ciencia_inativacao

NoOp function, ignores all arguments.

tipo_solicitacao

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

uuid

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

MotivoNegacao

Catálogo de motivos de negação de uma solicitação, com vínculo opcional ao processo de cancelamento ou inclusão.

class MotivoNegacao(*args, **kwargs)[source]

Bases: Descritivel

Catálogo de motivos de negação de uma solicitação de dieta especial.

processo

Processo ao qual o motivo se aplica. Pode ser CANCELAMENTO (solicitação de cancelamento de uma dieta especial ativa) ou INCLUSAO (solicitação de inclusão de uma nova dieta especial).

Type:

str

CANCELAMENTO = 'CANCELAMENTO'
exception DoesNotExist

Bases: ObjectDoesNotExist

INCLUSAO = 'INCLUSAO'
exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

PROCESSO_CHOICES = (('CANCELAMENTO', 'Solicitação de Cancelamento'), ('INCLUSAO', 'Solicitação de Inclusão'))
descricao

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_processo_display(*, field=<django.db.models.fields.CharField: processo>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
processo

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

solicitacaodietaespecial_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

MotivoAlteracaoUE

Catálogo de motivos de alteração de unidade educacional de uma dieta especial.

class MotivoAlteracaoUE(*args, **kwargs)[source]

Bases: Descritivel, Nomeavel, TemChaveExterna, Ativavel

Catálogo de motivos de alteração de unidade educacional da dieta.

Motivos possíveis:

  • Recreio nas Férias: a criança vai passar alguns dias em outra unidade educacional durante as férias escolares e precisa da sua dieta especial atendida nessa outra unidade.

  • Outro: a criança vai passar alguns dias em outra unidade educacional por algum outro motivo e precisa da sua dieta especial atendida nessa outra unidade.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

ativo

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

descricao

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nome

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
solicitacaodietaespecial_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

uuid

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

AlergiaIntolerancia

Catálogo de alergias e intolerâncias alimentares (diagnósticos) associadas às dietas especiais.

class AlergiaIntolerancia(*args, **kwargs)[source]

Bases: Descritivel

Catálogo de alergias e intolerâncias alimentares (diagnósticos).

Exemplos de diagnósticos:

  • Alergias (ovo, leite, amendoim)

  • TEA

  • Diabetes

  • Doenças

  • Intolerâncias

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

descricao

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
solicitacaodietaespecial_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

ClassificacaoDieta

Catálogo de classificações de dieta especial.

class ClassificacaoDieta(*args, **kwargs)[source]

Bases: Descritivel, Nomeavel

Catálogo de classificações de dieta especial.

Classificações possíveis:

  • Tipo A: alimentos diferenciados mais caros para troca; a troca vale apenas para o lanche.

  • Tipo A Enteral / Aminoácidos: alimentos caros para troca igual ao tipo A; a troca vale para lanche e refeição.

  • Tipo B: alimentos diferenciados, com menor custo que os do tipo A.

  • Tipo C: apenas altera algum ingrediente por outro, sem custo adicional. Ex.: troca peixe por carne.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

descricao

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

lancamentodiario_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

logs_dietas_autorizadas

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

logs_dietas_autorizadas_cei

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

logs_dietas_autorizadas_recreio_ferias

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

logs_dietas_autorizadas_recreio_ferias_cei

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

nome

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
solicitacaodietaespecial_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

Anexo

Anexo (arquivo) vinculado a uma solicitação de dieta especial, podendo ser laudo de alta.

class Anexo(*args, **kwargs)[source]

Bases: ExportModelOperationsMixin('anexo'), Model

Anexo (arquivo) vinculado a uma solicitação de dieta especial.

solicitacao_dieta_especial

Solicitação à qual o anexo pertence.

Type:

SolicitacaoDietaEspecial

nome

Nome do arquivo.

Type:

str

arquivo

Arquivo enviado.

Type:

FileField

eh_laudo_alta

Indica se o anexo é um laudo de alta.

Type:

bool

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

arquivo

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
eh_laudo_alta

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nome

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
solicitacao_dieta_especial

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

solicitacao_dieta_especial_id

SolicitacoesDietaEspecialAtivasInativasPorAluno

Modelo não gerenciado (view) que consolida a quantidade de dietas ativas e inativas por aluno.

class SolicitacoesDietaEspecialAtivasInativasPorAluno(*args, **kwargs)[source]

Bases: Model

View não gerenciada com a quantidade de dietas ativas e inativas por aluno.

aluno

Aluno referenciado (chave primária).

Type:

Aluno

ativas

Quantidade de dietas ativas do aluno.

Type:

int

inativas

Quantidade de dietas inativas do aluno.

Type:

int

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

aluno

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

aluno_id
ativas

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

inativas

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>