X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/blobdiff_plain/c2e85644c4128b2545fd4bbe0382f4e2e502bd83..refs/heads/django-4.2:/sommitrealweird/generic/views.py?ds=inline diff --git a/sommitrealweird/generic/views.py b/sommitrealweird/generic/views.py index 63d9ea1..1622617 100644 --- a/sommitrealweird/generic/views.py +++ b/sommitrealweird/generic/views.py @@ -1,14 +1,6 @@ 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'): - 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)