diff --git a/elections/migrations/0030_timestamps.py b/elections/migrations/0030_timestamps.py new file mode 100644 index 0000000..0149f46 --- /dev/null +++ b/elections/migrations/0030_timestamps.py @@ -0,0 +1,27 @@ +# Generated by Django 3.2.4 on 2021-06-28 20:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("elections", "0029_alter_election_visible"), + ] + + operations = [ + migrations.AddField( + model_name="election", + name="time_published", + field=models.DateTimeField( + default=None, null=True, verbose_name="date de publication" + ), + ), + migrations.AddField( + model_name="election", + name="time_tallied", + field=models.DateTimeField( + default=None, null=True, verbose_name="date du dépouillement" + ), + ), + ] diff --git a/elections/models.py b/elections/models.py index 25088e2..0fb2b79 100644 --- a/elections/models.py +++ b/elections/models.py @@ -72,6 +72,13 @@ class Election(models.Model): archived = models.BooleanField(_("archivée"), default=False) + time_tallied = models.DateTimeField( + _("date du dépouillement"), null=True, default=None + ) + time_published = models.DateTimeField( + _("date de publication"), null=True, default=None + ) + class Meta: permissions = [ ("is_admin", _("Peut administrer des élections")), diff --git a/elections/templates/elections/election.html b/elections/templates/elections/election.html index 0ce7c44..1d74332 100644 --- a/elections/templates/elections/election.html +++ b/elections/templates/elections/election.html @@ -4,15 +4,15 @@ {% block content %} -