Browse Source

Adicionado campo de tempo restante no cronometro

Websocket_painel
AlGouvea 3 years ago
parent
commit
564cfb7c6f
  1. 18
      sapl/painel/migrations/0004_cronometro_tempo_restante.py
  2. 6
      sapl/painel/models.py

18
sapl/painel/migrations/0004_cronometro_tempo_restante.py

@ -0,0 +1,18 @@
# Generated by Django 2.2.24 on 2021-10-05 13:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('painel', '0003_auto_20201013_1153'),
]
operations = [
migrations.AddField(
model_name='cronometro',
name='tempo_restante',
field=models.DurationField(blank=True, null=True, verbose_name='Tempo restante no cronômetro'),
),
]

6
sapl/painel/models.py

@ -49,5 +49,11 @@ class Cronometro(models.Model):
max_length=1, choices=CRONOMETRO_TYPES,
verbose_name=_('Tipo Cronômetro'))
tempo_restante = models.DurationField(
verbose_name=_('Tempo restante no cronômetro'),
blank=True,
null=True
)
class Meta:
ordering = ('-data_cronometro',)
Loading…
Cancel
Save