From 5024abc812b20dfcf16823dcc20992763afb6681 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Mon, 12 Apr 2021 01:28:54 +0100 Subject: [PATCH] add url field to DataIssue --- core/models.py | 1 + core/views/statistics.py | 2 ++ templates/dataissues.html | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/models.py b/core/models.py index cd8db02b..8d2d6580 100644 --- a/core/models.py +++ b/core/models.py @@ -93,6 +93,7 @@ class DataIssue(TroggleModel): date = models.DateTimeField(auto_now_add=True, blank=True) parser = models.CharField(max_length=50, blank=True, null=True) message = models.CharField(max_length=400, blank=True, null=True) + url = models.CharField(max_length=300, blank=True, null=True) # link to offending object class Meta: ordering = ['date'] diff --git a/core/views/statistics.py b/core/views/statistics.py index f7a54539..ac1e7ac0 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -145,6 +145,8 @@ def stats(request): return render(request,'statistics.html', renderDict) def dataissues(request): + '''Each issue has a parser, a message and a url linking to the offending object after loading + ''' def myFunc(di): return di.parser.lower() + di.message.lower() diff --git a/templates/dataissues.html b/templates/dataissues.html index 7c518a0e..46538a07 100644 --- a/templates/dataissues.html +++ b/templates/dataissues.html @@ -6,7 +6,7 @@

Loading data from files: Issues arising that need attention

-This is work in progress (April 2021). +This is work in progress (April 2021).The URL links to the offending objects are not enabled yet.