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
models
- class GrupoSuspensaoAlimentacao(*args, **kwargs)[source]
Bases:
ExportModelOperationsMixin('grupo_suspensao_alimentacao'),TemChaveExterna,CriadoPor,TemIdentificadorExternoAmigavel,CriadoEm,TemObservacao,FluxoInformativoPartindoDaEscola,Logs,TemPrioridade,TemTerceirizadaConferiuGestaoAlimentacaoServe 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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- escola_cancela
NoOp function, ignores all arguments.
- escola_id
- property existe_dia_cancelado
- 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>)
- 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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- rastro_terceirizada_id
- 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.childrenis aReverseManyToOneDescriptorinstance.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,TemChaveExternaTrabalha 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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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,CanceladoIndividualmenteTrabalha 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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- 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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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 SuspensaoAlimentacaoDaCEISerializer(*args, **kwargs)[source]
Bases:
ModelSerializer- class Meta[source]
Bases:
object- exclude = ('id',)
- model
alias of
SuspensaoAlimentacaoDaCEI
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.
- class QuantidadePorPeriodoSuspensaoAlimentacaoCreateSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
api/viewsets
- class GrupoSuspensaoAlimentacaoSerializerViewSet(**kwargs)[source]
Bases:
DataSolicitacaoContextMixin,ModelViewSet- 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)
- lookup_field = 'uuid'
- 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, só iremos servir lanche.</p>>, <GrupoSuspensaoAlimentacao: <p>Neste dia , não haverá aula para os alunos.</p>>, <GrupoSuspensaoAlimentacao: <p>Suspensão de aula. Dia já 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)...']>
- serializer_class
alias of
GrupoSuspensaoAlimentacaoSerializer
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>