From 9c28662058d3ad82c525d3cf07b44b76694f6e43 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 29 Oct 2019 17:49:23 +0100 Subject: [PATCH] Fix display affichage date summary --- logs/templates/logs/aff_summary.html | 10 +++++----- logs/views.py | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/logs/templates/logs/aff_summary.html b/logs/templates/logs/aff_summary.html index cf1725b0..7205bc6a 100644 --- a/logs/templates/logs/aff_summary.html +++ b/logs/templates/logs/aff_summary.html @@ -43,7 +43,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% for v in versions_list %} {% if v.version.content_type.model == 'ban' %} - {{ v.datetime }} + {{ v.datetime|date:"j/m/y H:i:s" }} {% blocktrans with username=v.username %}{{ username }} has banned{% endblocktrans %} {{ v.version.object.user.get_username }} @@ -66,7 +66,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% elif v.version.content_type.model == 'whitelist' %} - {{ v.datetime }} + {{ v.datetime|date:"j/m/y H:i:s" }} {% blocktrans with username=v.username %}{{ username }} has graciously authorised{% endblocktrans %} {{ v.version.object.user.get_username }} @@ -89,7 +89,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% elif v.version.content_type.model == 'user' %} - {{ v.datetime }} + {{ v.datetime|date:"j/m/y H:i:s" }} {% blocktrans with username=v.username %}{{ username }} has updated{% endblocktrans %} {{ v.version.object.get_username }} @@ -108,7 +108,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% elif v.version.content_type.model == 'vente' %} - {{ v.datetime }} + {{ v.datetime|date:"j/m/y H:i:s" }} {% blocktrans with username=v.username number=v.version.object.number name=v.version.object.name %}{{ username }} has sold {{ number }}x {{ name }}{% endblocktrans %} {% with invoice=v.version.object.facture %} @@ -132,7 +132,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% elif v.version.content_type.model == 'interface' %} - {{ v.datetime }} + {{ v.datetime|date:"j/m/y H:i:s" }} {% blocktrans with username=v.username %}{{ username }} has edited an interface of{% endblocktrans %} {{ v.version.object.machine.user.get_username }} diff --git a/logs/views.py b/logs/views.py index a3c8fe47..9e4629a4 100644 --- a/logs/views.py +++ b/logs/views.py @@ -148,9 +148,7 @@ def index(request): versions.object_list[i] = { 'rev_id': version.revision.id, 'comment': version.revision.comment, - 'datetime': version.revision.date_created.strftime( - '%d/%m/%y %H:%M:%S' - ), + 'datetime': version.revision.date_created, 'username': version.revision.user.get_username() if version.revision.user else '?',