add url field to DataIssue

This commit is contained in:
Philip Sargent 2021-04-12 01:28:54 +01:00
parent dbd9b1a095
commit 5024abc812
3 changed files with 5 additions and 2 deletions

View File

@ -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']

View File

@ -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()

View File

@ -6,7 +6,7 @@
<h1>Loading data from files: Issues arising that need attention</h1>
<p>
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.
<style>
tr { text-align:center;
font-family: Tahoma,'Trebuchet MS','Lucida Grande',Verdana, Arial, Helvetica, Sans-Serif;
@ -25,7 +25,7 @@ td { background : lightblue; }
<tr>
{% endifchanged %}
<td bgcolor={{mycolor}}>{{di.parser}}</td>
<td bgcolor={{mycolor}} style="text-align:left">{{di.message}}</td>
<td bgcolor={{mycolor}} style="text-align:left"><a href="{{di.url}}">{{di.message}}</a></td>
</tr>
{% endfor %}
</font>