From 622b44d5ba8448079dcd4a84f094c8650a3d1125 Mon Sep 17 00:00:00 2001 From: Tom Price Date: Fri, 29 May 2015 00:36:47 +0100 Subject: [PATCH] Stop emails falling of the end of the world #122 --- RIGS/templates/RIGS/version_changes.html | 4 ++-- RIGS/versioning.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/RIGS/templates/RIGS/version_changes.html b/RIGS/templates/RIGS/version_changes.html index 33f8c839..bbd15695 100644 --- a/RIGS/templates/RIGS/version_changes.html +++ b/RIGS/templates/RIGS/version_changes.html @@ -2,8 +2,8 @@ diff --git a/RIGS/versioning.py b/RIGS/versioning.py index e1e96793..9fd815b4 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 +from django.db.models import ForeignKey, IntegerField, EmailField from RIGS import models, forms import datetime @@ -50,7 +50,13 @@ def model_compare(oldObj, newObj, excluded_keys=[]): @property def new(self): - return self.display_value(self._new) + return self.display_value(self._new) + + @property + def long(self): + if isinstance(self.field, EmailField): + return True + return False changes = []