From 80874887cc78010dac35e0abb7a7cff25f37c909 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 25 Mar 2021 16:15:58 +0000 Subject: 404 fix attempt --- core/views_other.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/views_other.py') diff --git a/core/views_other.py b/core/views_other.py index cc8fe3a..0944d55 100644 --- a/core/views_other.py +++ b/core/views_other.py @@ -23,6 +23,14 @@ Also has code to download a logbook in a choice of formats (why?!) and to download all QMs (not working) """ +def troggle404(request): # cannot get this to work. Handler404 in urls.py not right syntax + '''Custom 404 page to be used even when Debug=True + https://blog.juanwolf.fr/posts/programming/how-to-create-404-page-django/ + ''' + context = RequestContext(request) + #context['caves'] = Cave.objects.all() + return render_to_response('404.html', context.flatten()) + def showrequest(request): return HttpResponse(request.GET) -- cgit v1.2.3