diff --git a/core/views/statistics.py b/core/views/statistics.py index 1f11bed..574afa8 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -11,7 +11,7 @@ from django.template.defaultfilters import slugify from django.utils import timezone #from django.views.generic.list import ListView -from troggle.core.models import Expedition, Person, PersonExpedition +from troggle.core.models import Expedition, Person, PersonExpedition, DataIssue from troggle.core.models_caves import Cave, LogbookEntry from troggle.core.models_survex import SurvexBlock @@ -143,3 +143,13 @@ def stats(request): renderDict = {**statsDict, **{ "addupsurvexlength":addupsurvexlength/1000, "legsbyexpo":legsbyexpo }} # new syntax 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 + + return render(request,'dataissues.html', {'didict': alldi}) diff --git a/templates/base.html b/templates/base.html index 2e7e536..101d1ef 100644 --- a/templates/base.html +++ b/templates/base.html @@ -39,6 +39,7 @@ 204 (Steinbrucken) |
+ Data Issues | handbook | tasks to do | caves | diff --git a/templates/dataissues.html b/templates/dataissues.html new file mode 100644 index 0000000..f3b9543 --- /dev/null +++ b/templates/dataissues.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% block title %}Expo issues on data import{% endblock %} + +{% block content %} + +

Loading data from files: Issues arising that need attention

+ +

+This is work in progress (April 2021). + + + +{% for di in didict %} + + + + + +{% endfor %} +
ParserIssueImport Date
{{di.parser}}{{di.message}}{{di.date}}
+ + +{% endblock %} \ No newline at end of file diff --git a/urls.py b/urls.py index abff59e..1e0b080 100644 --- a/urls.py +++ b/urls.py @@ -10,7 +10,7 @@ from django.urls import reverse, resolve from troggle.core.views import surveys, logbooks, other, caves, statistics, survex from troggle.core.views.other import troggle404, frontpage from troggle.core.views.caves import ent, prospecting_image, cavepage -from troggle.core.views.statistics import pathsreport, stats +from troggle.core.views.statistics import pathsreport, stats, dataissues from troggle.core.views.expo import expofiles_redirect, expofilessingle, expopage, editexpopage, mediapage from troggle.core.views.survex import survexcaveslist, survexcavesingle, svx from troggle.core.views.auth import expologin, expologout @@ -118,8 +118,9 @@ trogglepatterns = [ url(r'^statistics/?$', statistics.stats, name="stats"), - url(r'^stats/?$', statistics.stats, name="stats"), - url(r'^pathsreport.*$', statistics.pathsreport, name="pathsreport"), + url(r'^stats/?$', statistics.stats, name="stats"), + url(r'^pathsreport.*$', statistics.pathsreport, name="pathsreport"), + url(r'^dataissues/?$', statistics.dataissues, name="dataissues"), url(r'^controlpanel/?$', other.controlPanel, name="controlpanel"),