This commit is contained in:
Ross
2021-08-23 19:33:04 +01:00
parent f6bf034f4a
commit 3d42468f76
3 changed files with 6 additions and 10 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ urlpatterns = [
#handler400 = 'my_app.views.bad_request'
#handler403 = 'my_app.views.permission_denied'
handler404 = 'views.page_not_found'
handler404 = 'rad.views.page_not_found'
#handler500 = 'my_app.views.server_error'
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+3 -9
View File
@@ -52,9 +52,6 @@ from generic.models import QuestionNote
import json
from django.shortcuts import (
render_to_response
)
from django.template import RequestContext
def feedback_checker(user):
@@ -335,12 +332,9 @@ def view_feedback(request):
)
# HTTP Error 400
def page_not_found(request):
response = render_to_response(
'404.html',
context_instance=RequestContext(request)
)
def page_not_found(request, exception):
response = render(request, '404.html', {})
response.status_code = 404
#response.status_code = 404
return response
+2
View File
@@ -1,6 +1,8 @@
{% extends 'base.html' %}
{% block content %}
<div class="">
<h2>404 error</h2>
Page not found....
</div>
{% endblock %}