Sistema de Apoio ao Processo Legislativo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

53 lines
1.4 KiB

import reversion
from django.db import models
from django.utils.translation import ugettext_lazy as _
@reversion.register()
class Painel(models.Model):
PAINEL_TYPES = (
('C', 'Completo'),
('P', 'Parlamentares'),
('V', 'Votação'),
('M', 'Mensagem'),
)
aberto = models.BooleanField(verbose_name=_('Abrir painel'), default=False)
data_painel = models.DateField(verbose_name=_('Data painel'))
mostrar = models.CharField(max_length=1,
choices=PAINEL_TYPES, default='C')
class Meta:
ordering = ('-data_painel',)
def __str__(self):
return str(self.aberto) + ":" + self.data_painel.strftime("%d/%m/%Y")
@reversion.register()
class Cronometro(models.Model):
CRONOMETRO_TYPES = (
('A', _('Aparte')),
('D', _('Discurso')),
('O', _('Ordem do dia')),
('C', _('Considerações finais'))
)
CRONOMETRO_STATUS = (
('I', 'Start'),
('R', 'Reset'),
('S', 'Stop'),
)
status = models.CharField(
max_length=1,
verbose_name=_('Status do cronômetro'),
choices=CRONOMETRO_STATUS,
default='S')
data_cronometro = models.DateField(verbose_name=_('Data do cronômetro'))
tipo = models.CharField(
max_length=1, choices=CRONOMETRO_TYPES,
verbose_name=_('Tipo Cronômetro'))
class Meta:
ordering = ('-data_cronometro',)