From c6e442b4224c0e05395d56c83cbdcffcd0d973b7 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 29 Jun 2015 00:44:34 +0100 Subject: [PATCH] Fixed date formatting issue #141 --- RIGS/templates/RIGS/version_changes.html | 21 +++++++++++++++++++-- RIGS/versioning.py | 10 ++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/RIGS/templates/RIGS/version_changes.html b/RIGS/templates/RIGS/version_changes.html index bbd15695..98abaf15 100644 --- a/RIGS/templates/RIGS/version_changes.html +++ b/RIGS/templates/RIGS/version_changes.html @@ -2,8 +2,25 @@ diff --git a/RIGS/versioning.py b/RIGS/versioning.py index 9fd815b4..fa54e9ff 100644 --- a/RIGS/versioning.py +++ b/RIGS/versioning.py @@ -16,7 +16,7 @@ import simplejson from reversion.models import Version from django.contrib.contenttypes.models import ContentType # Used to lookup the content_type from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger -from django.db.models import ForeignKey, IntegerField, EmailField +from django.db.models import ForeignKey, IntegerField, EmailField, TextField from RIGS import models, forms import datetime @@ -56,7 +56,13 @@ def model_compare(oldObj, newObj, excluded_keys=[]): def long(self): if isinstance(self.field, EmailField): return True - return False + return False + + @property + def linebreaks(self): + if isinstance(self.field, TextField): + return True + return False changes = []