summaryrefslogtreecommitdiffstats
path: root/core/views/statistics.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-04-12 01:00:47 +0100
committerPhilip Sargent <philip.sargent@klebos.com>2021-04-12 01:00:47 +0100
commitf6f83c6f704ff66f6de7d3f51c83f3960ed0011b (patch)
tree6485799adef040659024d0fe7eccc3ec29bbebec /core/views/statistics.py
parentbc9b4f508b9b531500bac60ed7c7f8f3766b27f0 (diff)
downloadtroggle-f6f83c6f704ff66f6de7d3f51c83f3960ed0011b.tar.gz
troggle-f6f83c6f704ff66f6de7d3f51c83f3960ed0011b.tar.bz2
troggle-f6f83c6f704ff66f6de7d3f51c83f3960ed0011b.zip
data issues much easier to read
Diffstat (limited to 'core/views/statistics.py')
-rw-r--r--core/views/statistics.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/views/statistics.py b/core/views/statistics.py
index 574afa8..f7a5453 100644
--- a/core/views/statistics.py
+++ b/core/views/statistics.py
@@ -145,11 +145,10 @@ def stats(request):
return render(request,'statistics.html', renderDict)
def dataissues(request):
- didict={}
- for di in DataIssue.objects.all():
- didict['parser'] = di.parser
- didict['message']= di.message
- didict['date']= di.date
- alldi = DataIssue.objects.all
+ def myFunc(di):
+ return di.parser.lower() + di.message.lower()
+
+ dilist = list(DataIssue.objects.all())
+ dilist.sort(key = myFunc)
- return render(request,'dataissues.html', {'didict': alldi})
+ return render(request,'dataissues.html', {'didict': dilist})