On ajoute date de création et modification

This commit is contained in:
Jean-Marie Favreau 2023-11-17 17:08:55 +01:00
parent 2a2666abe2
commit caa73bd1c2
3 changed files with 13 additions and 0 deletions

View File

@ -153,6 +153,9 @@ class Event(models.Model):
def is_trash(self):
return self.status == Event.STATUS.TRASH
def modified(self):
return abs((self.modified_date - self.created_date).total_seconds()) > 1
class EventSubmissionForm(models.Model):

View File

@ -385,3 +385,8 @@ $red-900: #b71c1c !default;
--icon: var(--icon-valid);
--color: #{$green-800};
}
.footer {
opacity: 0.7;
font-size: 80%;
}

View File

@ -44,6 +44,11 @@
{% else %}
<p><em>Cet événement est disponible uniquement sur les nuits énimagmatiques.</em></p>
{% endif %}
<p class="footer">Création&nbsp;: {{ event.created_date }}
{% if event.modified %}
— dernière modification&nbsp;: {{ event.modified_date }}
{% endif %}
</p>
</div>
{% if user.is_authenticated %}
<div class="buttons">