2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-22 07:11:52 +00:00

avoiding problem with WSGI populate() error

This commit is contained in:
Philip Sargent 2020-07-20 18:31:50 +01:00
parent 1523586b37
commit 28130de9cb

View File

@ -26,9 +26,12 @@ def frontpage(request):
expeditions = Expedition.objects.order_by("-year")
logbookentry = LogbookEntry
cave = Cave
from django.contrib.admin.templatetags import log
#from django.contrib.admin.templatetags import log
return render(request,'frontpage.html', locals())
print(" - controlPanel() is next in troggle/core/views_other.py")
def controlPanel(request):
jobs_completed=[]
if request.method=='POST':
@ -51,6 +54,9 @@ def controlPanel(request):
return render(request,'controlPanel.html', {'caves':Cave.objects.all(),'expeditions':Expedition.objects.all(),'jobs_completed':jobs_completed})
print(" - downloadLogbook() is next in troggle/core/views_other.py")
def downloadLogbook(request,year=None,extension=None,queryset=None):
if year:
@ -82,7 +88,9 @@ def downloadLogbook(request,year=None,extension=None,queryset=None):
c=Context({'logbook_entries':logbook_entries})
response.write(t.render(c))
return response
print(" - downloadQMs() is next in troggle/core/views_other.py")
def downloadQMs(request):
# Note to self: use get_cave method for the below
@ -118,6 +126,9 @@ def ajax_QM_number(request):
return HttpResponse(res)
print(" - logbook_entry_suggestions() is next in troggle/core/views_other.py")
def logbook_entry_suggestions(request):
"""
Generates a html box with suggestions about what to do with QMs
@ -175,6 +186,8 @@ def logbook_entry_suggestions(request):
'any_suggestions':any_suggestions
})
print(" - newFile() is next in troggle/core/views_other.py")
@login_required_if_public
def newFile(request, pslug = None):
if pslug:
@ -229,3 +242,5 @@ def delFile(f):
pt.delete()
lbe.delete()
os.remove(lbe.filename)
print("** Finished importing troggle/core/views_other.py")