suspensao_alimentacao

admin

class GrupoSuspensaoAlimentacaoModelAdmin(model, admin_site)[source]

Bases: ModelAdmin

inlines = [<class 'sme_sigpae_api.cardapio.suspensao_alimentacao.admin.SuspensaoAlimentacaoInline'>, <class 'sme_sigpae_api.cardapio.suspensao_alimentacao.admin.QuantidadePorPeriodoSuspensaoAlimentacaoInline'>]
property media
class QuantidadePorPeriodoSuspensaoAlimentacaoInline(parent_model, admin_site)[source]

Bases: TabularInline

extra = 1
property media
model

alias of QuantidadePorPeriodoSuspensaoAlimentacao

class SuspensaoAlimentacaoInline(parent_model, admin_site)[source]

Bases: TabularInline

extra = 1
property media
model

alias of SuspensaoAlimentacao

models

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

Bases: ExportModelOperationsMixin('grupo_suspensao_alimentacao'), TemChaveExterna, CriadoPor, TemIdentificadorExternoAmigavel, CriadoEm, TemObservacao, FluxoInformativoPartindoDaEscola, Logs, TemPrioridade, TemTerceirizadaConferiuGestaoAlimentacao

Serve para agrupar suspensões.

Vide SuspensaoAlimentacao e QuantidadePorPeriodoSuspensaoAlimentacao

DESCRICAO = 'Suspensão de Alimentação'
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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
property data
property datas
desta_semana = <sme_sigpae_api.cardapio.suspensao_alimentacao.managers.suspensao_alimentacao_managers.GrupoSuspensaoAlimentacaoDestaSemanaManager object>
deste_mes = <sme_sigpae_api.cardapio.suspensao_alimentacao.managers.suspensao_alimentacao_managers.GrupoSuspensaoAlimentacaoDesteMesManager object>
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.

escola_cancela

NoOp function, ignores all arguments.

escola_id
property existe_dia_cancelado
classmethod get_informados()[source]
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)
classmethod get_rascunhos_do_usuario(usuario)[source]
get_status_display(*, field=<django_xworkflows.models.StateField: status>)
classmethod get_tomados_ciencia()[source]
id

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

informa

NoOp function, ignores all arguments.

property numero_alunos
objects = <django.db.models.manager.Manager object>
observacao

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

property path
quantidades_por_periodo

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_forward_many_to_many_manager() defined below.

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
salvar_log_transicao(status_evento, usuario, **kwargs)[source]
solicitacao_dict_para_relatorio(label_data, data_log, instituicao)[source]
status = <sme_sigpae_api.dados_comuns.fluxo_status.InformativoPartindoDaEscolaWorkflow object>
suspensoes_alimentacao

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_forward_many_to_many_manager() defined below.

property template_mensagem
terceirizada_conferiu_gestao

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

terceirizada_toma_ciencia

NoOp function, ignores all arguments.

property tipo
uuid

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

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

Bases: ExportModelOperationsMixin('motivo_suspensao'), Nomeavel, TemChaveExterna

Trabalha em conjunto com SuspensaoAlimentacao.

Exemplos:
  • greve

  • reforma

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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>
suspensaoalimentacao_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_forward_many_to_many_manager() defined below.

suspensaoalimentacaodacei_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_forward_many_to_many_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.

class QuantidadePorPeriodoSuspensaoAlimentacao(id, uuid, numero_alunos, periodo_escolar, grupo_suspensao, alunos_cei_ou_emei)[source]

Bases: ExportModelOperationsMixin('quantidade_periodo'), TemChaveExterna

CEI_OU_EMEI_CHOICES = [('TODOS', 'Todos'), ('CEI', 'CEI'), ('EMEI', 'EMEI')]
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

alunos_cei_ou_emei

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

get_alunos_cei_ou_emei_display(*, field=<django.db.models.fields.CharField: alunos_cei_ou_emei>)
grupo_suspensao

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.

grupo_suspensao_id
id

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

numero_alunos

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>
periodo_escolar

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.

periodo_escolar_id
tipos_alimentacao

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.

uuid

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

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

Bases: ExportModelOperationsMixin('suspensao_alimentacao'), TemData, TemChaveExterna, CanceladoIndividualmente

Trabalha em conjunto com GrupoSuspensaoAlimentacao.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

cancelado

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

cancelado_em

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

cancelado_justificativa

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

cancelado_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.

cancelado_por_id
data

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

get_next_by_data(*, field=<django.db.models.fields.DateField: data>, is_next=True, **kwargs)
get_previous_by_data(*, field=<django.db.models.fields.DateField: data>, is_next=False, **kwargs)
grupo_suspensao

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.

grupo_suspensao_id
id

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

motivo

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_id
objects = <django.db.models.manager.Manager object>
outro_motivo

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

prioritario

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

suspensoes_periodo_escolar

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_forward_many_to_many_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.

class SuspensaoAlimentacaoNoPeriodoEscolar(id, uuid, suspensao_alimentacao, qtd_alunos, periodo_escolar)[source]

Bases: ExportModelOperationsMixin('suspensao_periodo_escolar'), TemChaveExterna

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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>
periodo_escolar

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.

periodo_escolar_id
qtd_alunos

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

suspensao_alimentacao

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.

suspensao_alimentacao_id
tipos_alimentacao

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.

uuid

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

api

api/serializers

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

Bases: ModelSerializer

class Meta[source]

Bases: object

fields = ('uuid', 'id_externo', 'status', 'prioridade', 'criado_em', 'escola')
model

alias of GrupoSuspensaoAlimentacao

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

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id',)
model

alias of GrupoSuspensaoAlimentacao

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

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id', 'criado_por', 'escola')
model

alias of GrupoSuspensaoAlimentacao

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

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id',)
model

alias of MotivoSuspensao

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

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id', 'grupo_suspensao')
model

alias of QuantidadePorPeriodoSuspensaoAlimentacao

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

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id',)
model

alias of SuspensaoAlimentacaoDaCEI

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

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id', 'suspensao_alimentacao')
model

alias of SuspensaoAlimentacaoNoPeriodoEscolar

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

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id', 'grupo_suspensao')
model

alias of SuspensaoAlimentacao

api/serializers_create

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

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id',)
model

alias of GrupoSuspensaoAlimentacao

create(validated_data)[source]

We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:

return ExampleModel.objects.create(**validated_data)

If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:

example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance

The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit .create() method.

update(instance, validated_data)[source]
class QuantidadePorPeriodoSuspensaoAlimentacaoCreateSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id', 'grupo_suspensao')
model

alias of QuantidadePorPeriodoSuspensaoAlimentacao

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

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id',)
model

alias of SuspensaoAlimentacao

validate_data(data)[source]
class SuspensaoAlimentacaoNoPeriodoEscolarCreateSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ('id', 'suspensao_alimentacao')
model

alias of SuspensaoAlimentacaoNoPeriodoEscolar

api/viewsets

class GrupoSuspensaoAlimentacaoSerializerViewSet(**kwargs)[source]

Bases: DataSolicitacaoContextMixin, ModelViewSet

destroy(request, *args, **kwargs)[source]
escola_cancela(request, uuid=None)[source]
get_permissions()[source]

Instantiates and returns the list of permissions that this view requires.

get_serializer_class()[source]

Return the class to use for the serializer. Defaults to using self.serializer_class.

You may want to override this if you need to provide different serializations depending on the incoming request.

(Eg. admins get full serialization, others get basic serialization)

informa_suspensao(request, uuid=None)[source]
informadas(request)[source]
lookup_field = 'uuid'
meus_rascunhos(request)[source]
permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
queryset = <QuerySet [<GrupoSuspensaoAlimentacao: <p></p>>, <GrupoSuspensaoAlimentacao: <p></p>>, <GrupoSuspensaoAlimentacao: <p></p>>, <GrupoSuspensaoAlimentacao: <p>CONSELHO DE CLASSE</p>>, <GrupoSuspensaoAlimentacao: <p></p>>, <GrupoSuspensaoAlimentacao: <p></p>>, <GrupoSuspensaoAlimentacao: <p>Neste dia, iremos servir lanche.</p>>, <GrupoSuspensaoAlimentacao: <p>Neste dia , não haverá aula para os alunos.</p>>, <GrupoSuspensaoAlimentacao: <p>Suspensão de aula. Dia reposto.</p>>, <GrupoSuspensaoAlimentacao: <p></p>>, <GrupoSuspensaoAlimentacao: <p>Nesta data esta prevista suspensão de atividade de acordo com calendário homologado.</p>>, <GrupoSuspensaoAlimentacao: <p>REUNIÃO PEDAGÓGICA PREVISTA EM CALENDÁRIO</p>>, <GrupoSuspensaoAlimentacao: <p>Nesta data está prevista Jornada Pedagógica para todas as unidades escolares. Não é dia letivo.</p>>, <GrupoSuspensaoAlimentacao: <p>Aula parcial.</p>>, <GrupoSuspensaoAlimentacao: <p>Suspensão de alimentação devido à Reunião Pedagógica prevista em calendário Escolar.</p>>, <GrupoSuspensaoAlimentacao: <p></p>>, <GrupoSuspensaoAlimentacao: <p></p>>, <GrupoSuspensaoAlimentacao: >, <GrupoSuspensaoAlimentacao: >, <GrupoSuspensaoAlimentacao: <p></p>>, '...(remaining elements truncated)...']>
relatorio(request, uuid=None)[source]
serializer_class

alias of GrupoSuspensaoAlimentacaoSerializer

solicitacoes_codae(request, filtro_aplicado='sem_filtro')[source]
solicitacoes_terceirizada(request, filtro_aplicado='sem_filtro')[source]
terceirizada_marca_inclusao_como_conferida(request, uuid=None)[source]
terceirizada_toma_ciencia(request, uuid=None)[source]
tomados_ciencia(request)[source]
valida_datas(obj, datas)[source]
class MotivosSuspensaoCardapioViewSet(**kwargs)[source]

Bases: ReadOnlyModelViewSet

lookup_field = 'uuid'
queryset = <QuerySet [<MotivoSuspensao: Parada Pedagógica>, <MotivoSuspensao: Unidade sem atendimento>, <MotivoSuspensao: Outro>]>
serializer_class

alias of MotivoSuspensaoSerializer

fixtures

fixtures/factories

class GrupoSuspensaoAlimentacaoFactory(**kwargs)[source]

Bases: DjangoModelFactory

escola = <factory.declarations.SubFactory object>
rastro_dre = <factory.declarations.SubFactory object>
rastro_escola = <factory.declarations.SubFactory object>
rastro_lote = <factory.declarations.SubFactory object>
rastro_terceirizada = <factory.declarations.SubFactory object>
class MotivoSuspensaoFactory(**kwargs)[source]

Bases: DjangoModelFactory

nome = <factory.declarations.Sequence object>
class QuantidadePorPeriodoSuspensaoAlimentacaoFactory(**kwargs)[source]

Bases: DjangoModelFactory

grupo_suspensao = <factory.declarations.SubFactory object>
numero_alunos = <factory.declarations.Sequence object>
periodo_escolar = <factory.declarations.SubFactory object>
tipos_alimentacao = <factory.declarations.PostGeneration object>
class SuspensaoAlimentacaoFactory(**kwargs)[source]

Bases: DjangoModelFactory

grupo_suspensao = <factory.declarations.SubFactory object>
motivo = <factory.declarations.SubFactory object>
class SuspensaoAlimentacaoNoPeriodoEscolarFactory(**kwargs)[source]

Bases: DjangoModelFactory

periodo_escolar = <factory.declarations.SubFactory object>
qtd_alunos = <factory.declarations.Sequence object>
suspensao_alimentacao = <factory.declarations.SubFactory object>
tipos_alimentacao = <factory.declarations.PostGeneration object>

managers

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

Bases: Manager

get_queryset()[source]

Return a new QuerySet object. Subclasses can override this method to customize the behavior of the Manager.

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

Bases: Manager

get_queryset()[source]

Return a new QuerySet object. Subclasses can override this method to customize the behavior of the Manager.