not_found.py
18 lines
| 415 B
| text/x-python
|
PythonLexer
|
r555 | from django.shortcuts import render | ||
from boards.views.base import BaseBoardView | ||||
|
r561 | |||
|
r555 | class NotFoundView(BaseBoardView): | ||
|
r561 | """ | ||
|
r555 | Page 404 (not found) | ||
|
r561 | """ | ||
|
r555 | |||
def get(self, request): | ||||
context = self.get_context_data(request=request) | ||||
|
r872 | |||
# TODO Use dict here | ||||
|
r890 | response = render(request, 'boards/404.html', context_instance=context) | ||
response.status_code = 404 | ||||
return response | ||||