##// END OF EJS Templates
Throw error 404 when trying to open invalid page in threads list
Throw error 404 when trying to open invalid page in threads list

File last commit:

r919:84a3726d default
r977:6b112efe default
Show More
not_found.py
17 lines | 352 B | text/x-python | PythonLexer
from django.shortcuts import render
from boards.views.base import BaseBoardView
class NotFoundView(BaseBoardView):
"""
Page 404 (not found)
"""
def get(self, request):
params = self.get_context_data()
response = render(request, 'boards/404.html', params)
response.status_code = 404
return response