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)