mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
offline message
This commit is contained in:
parent
07fc372b41
commit
a2f4591f72
@ -267,7 +267,10 @@ def stats(request):
|
|||||||
|
|
||||||
|
|
||||||
def dataissues(request):
|
def dataissues(request):
|
||||||
"""Each issue has a parser, a message and a url linking to the offending object after loading"""
|
"""Each issue has a parser, a message and a url linking to the offending object after loading
|
||||||
|
|
||||||
|
This page happens to be the first one looked for, so if the server is offline, this is
|
||||||
|
where the error happens."""
|
||||||
|
|
||||||
def myFunc(di):
|
def myFunc(di):
|
||||||
return di.parser.lower() + di.message.lower()
|
return di.parser.lower() + di.message.lower()
|
||||||
@ -275,7 +278,12 @@ def dataissues(request):
|
|||||||
dilist = list(DataIssue.objects.all())
|
dilist = list(DataIssue.objects.all())
|
||||||
dilist.sort(key=myFunc)
|
dilist.sort(key=myFunc)
|
||||||
|
|
||||||
return render(request, "dataissues.html", {"didict": dilist, "year": current_expo()})
|
try:
|
||||||
|
return render(request, "dataissues.html", {"didict": dilist, "year": current_expo()})
|
||||||
|
except:
|
||||||
|
message = f'! - Server not online - please wait 5 minutes for database rebuild'
|
||||||
|
print(message)
|
||||||
|
return render(request, "errors/generic.html", {"message": message})
|
||||||
|
|
||||||
|
|
||||||
def stations(request):
|
def stations(request):
|
||||||
|
Loading…
Reference in New Issue
Block a user