Add home and rules pages

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-07-17 18:16:30 -07:00
parent b40b65bef6
commit 4709f5567e
4 changed files with 81 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ __all__ = (
"BanSuccessView",
"BannedView",
"BoardView",
"HomeView",
"NewsListView",
"PostCreateView",
"PostModifyView",
@@ -48,6 +49,15 @@ def can_modify(user):
)
class HomeView(TemplateView):
template_name = "board/home.html"
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]:
context = super().get_context_data(**kwargs)
context["boards"] = Board.objects.filter(readonly=False)
return context
class ActionSuccessView(TemplateView):
template_name = "board/action_success.html"
message = "Action completed."