]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/generic/views.py
Update for newer django
[sommitrealweird.git] / sommitrealweird / generic / views.py
index 63d9ea13fff8ab179035ced00ba6e20cbf4e2587..16226172470841144faa5b6add4998fad135f1f4 100644 (file)
@@ -1,14 +1,6 @@
 from settings import MEDIA_URL
 from settings import MEDIA_URL
-from django.http import HttpResponseNotFound
-from django.template import RequestContext, loader 
-
+from django.shortcuts import render
 
 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)