From 25912e3c3a7c3e54ab84fd467b8db03f3c6e3a66 Mon Sep 17 00:00:00 2001 From: Gustavo Santana Date: Thu, 18 Aug 2016 10:32:24 -0300 Subject: [PATCH 1/2] Updated template that displays the record change history --- suit/templates/admin/object_history.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/suit/templates/admin/object_history.html b/suit/templates/admin/object_history.html index fec15548..cda7aae0 100644 --- a/suit/templates/admin/object_history.html +++ b/suit/templates/admin/object_history.html @@ -33,8 +33,8 @@ {% for action in action_list %} {{ action.action_time|date:"DATETIME_FORMAT" }} - {{ action.user.username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %} - {{ action.change_message }} + {{ action.user.get_username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %} + {{ action.get_change_message }} {% endfor %} From b3545ad1f7aedb934532894cdbbc237611e27234 Mon Sep 17 00:00:00 2001 From: Gustavo Santana Date: Thu, 18 Aug 2016 11:01:38 -0300 Subject: [PATCH 2/2] Added support for earlier versions of Django. --- suit/templates/admin/object_history.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/suit/templates/admin/object_history.html b/suit/templates/admin/object_history.html index cda7aae0..12bb7069 100644 --- a/suit/templates/admin/object_history.html +++ b/suit/templates/admin/object_history.html @@ -1,5 +1,5 @@ {% extends "admin/base_site.html" %} -{% load i18n admin_urls %} +{% load i18n admin_urls suit_tags %} {% load url from suit_compat %} {% block breadcrumbs %} @@ -33,8 +33,13 @@ {% for action in action_list %} {{ action.action_time|date:"DATETIME_FORMAT" }} - {{ action.user.get_username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %} - {{ action.get_change_message }} + {% if '1.10'|django_version_lt %} + {{ action.user.username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %} + {{ action.change_message }} + {% else %} + {{ action.user.get_username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %} + {{ action.get_change_message }} + {% endif %} {% endfor %}