Переглянути джерело

Specialist 404/500 handlers now return correct status codes

master
David Winterbottom 13 роки тому
джерело
коміт
e226bcbf42
1 змінених файлів з 2 додано та 2 видалено
  1. 2
    2
      oscar/views/__init__.py

+ 2
- 2
oscar/views/__init__.py Переглянути файл

@@ -2,8 +2,8 @@ from django.shortcuts import render
2 2
 
3 3
 
4 4
 def handler404(request):
5
-    return render(request, '404.html')
5
+    return render(request, '404.html', status=404)
6 6
 
7 7
 
8 8
 def handler500(request):
9
-    return render(request, '500.html')
9
+    return render(request, '500.html', status=500)

Завантаження…
Відмінити
Зберегти