Add "boards" context processor
This adds the "boards" context data to all pages, so they can render the boards nav page. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -24,7 +24,6 @@ __all__ = (
|
||||
"BanSuccessView",
|
||||
"BannedView",
|
||||
"BoardView",
|
||||
"HomeView",
|
||||
"NewsListView",
|
||||
"PostCreateView",
|
||||
"PostModifyView",
|
||||
@@ -49,15 +48,6 @@ 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."
|
||||
|
||||
Reference in New Issue
Block a user