forked from expo/troggle
add url field to DataIssue
This commit is contained in:
@@ -93,6 +93,7 @@ class DataIssue(TroggleModel):
|
|||||||
date = models.DateTimeField(auto_now_add=True, blank=True)
|
date = models.DateTimeField(auto_now_add=True, blank=True)
|
||||||
parser = models.CharField(max_length=50, blank=True, null=True)
|
parser = models.CharField(max_length=50, blank=True, null=True)
|
||||||
message = models.CharField(max_length=400, 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:
|
class Meta:
|
||||||
ordering = ['date']
|
ordering = ['date']
|
||||||
|
|||||||
@@ -145,6 +145,8 @@ def stats(request):
|
|||||||
return render(request,'statistics.html', renderDict)
|
return render(request,'statistics.html', renderDict)
|
||||||
|
|
||||||
def dataissues(request):
|
def dataissues(request):
|
||||||
|
'''Each issue has a parser, a message and a url linking to the offending object after loading
|
||||||
|
'''
|
||||||
def myFunc(di):
|
def myFunc(di):
|
||||||
return di.parser.lower() + di.message.lower()
|
return di.parser.lower() + di.message.lower()
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<h1>Loading data from files: Issues arising that need attention</h1>
|
<h1>Loading data from files: Issues arising that need attention</h1>
|
||||||
|
|
||||||
<p>
|
<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>
|
<style>
|
||||||
tr { text-align:center;
|
tr { text-align:center;
|
||||||
font-family: Tahoma,'Trebuchet MS','Lucida Grande',Verdana, Arial, Helvetica, Sans-Serif;
|
font-family: Tahoma,'Trebuchet MS','Lucida Grande',Verdana, Arial, Helvetica, Sans-Serif;
|
||||||
@@ -25,7 +25,7 @@ td { background : lightblue; }
|
|||||||
<tr>
|
<tr>
|
||||||
{% endifchanged %}
|
{% endifchanged %}
|
||||||
<td bgcolor={{mycolor}}>{{di.parser}}</td>
|
<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>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</font>
|
</font>
|
||||||
|
|||||||
Reference in New Issue
Block a user