diff --git a/approval_polls/models.py b/approval_polls/models.py index 99bdd86..de4b573 100644 --- a/approval_polls/models.py +++ b/approval_polls/models.py @@ -139,7 +139,7 @@ def __str__(self): class Ballot(models.Model): poll = models.ForeignKey(Poll, on_delete=models.CASCADE, null=True, blank=True) user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True) - timestamp = models.DateTimeField("time voted") + timestamp = models.DateTimeField("time voted", auto_now_add=True) permit_email = models.BooleanField(default=False) email = models.EmailField(null=True, blank=True) diff --git a/approval_polls/templates/base.html b/approval_polls/templates/base.html index 3898770..1600d1d 100644 --- a/approval_polls/templates/base.html +++ b/approval_polls/templates/base.html @@ -69,7 +69,7 @@ {% block login %} {% if user.is_authenticated %}