not_found.py
17 lines
| 369 B
| text/x-python
|
PythonLexer
neko259
|
r555 | from django.shortcuts import render | ||
from boards.views.base import BaseBoardView | ||||
neko259
|
r561 | |||
neko259
|
r555 | class NotFoundView(BaseBoardView): | ||
neko259
|
r561 | """ | ||
neko259
|
r555 | Page 404 (not found) | ||
neko259
|
r561 | """ | ||
neko259
|
r555 | |||
neko259
|
r1988 | def get(self, request, *args, **kwargs): | ||
neko259
|
r919 | params = self.get_context_data() | ||
neko259
|
r872 | |||
neko259
|
r919 | response = render(request, 'boards/404.html', params) | ||
neko259
|
r890 | response.status_code = 404 | ||
return response | ||||