]> git.sommitrealweird.co.uk Git - sommitrealweird.git/commitdiff
Fix 404 renderer
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Wed, 28 Aug 2019 15:54:24 +0000 (16:54 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Wed, 28 Aug 2019 15:54:24 +0000 (16:54 +0100)
sommitrealweird/generic/views.py

index 63d9ea13fff8ab179035ced00ba6e20cbf4e2587..8bed87d8bc09ddee3865aa3ba90e3bc1a000fcea 100644 (file)
@@ -4,11 +4,5 @@ from django.template import RequestContext, loader
 
 
 def render_404(request, template_name='404.html'):
 
 
 def render_404(request, template_name='404.html'):
-    t = loader.get_template(template_name)
-    return HttpResponseNotFound( \
-        t.render(RequestContext(request,
-            {
-                'request_path': request.path,
-                'media_url'   : MEDIA_URL,
-            }
-        )))
+    c = {}
+    return render(request, '404.html', c, status=404)