style: improve ue detail infos appearance

This commit is contained in:
imperosol committed 2026-10-02 15:09:14 +02:00
1 parent f211d0ff85
commit 45cca918f1
9 files changed
+179 -232

No files matched your search

+10 -7
View File
@@ -88,16 +88,19 @@ class UEDetailView(
model = UE
pk_url_kwarg = "ue_id"
template_name = "pedagogy/ue_detail.jinja"
permission_required = "pedagogy.view_ue"
fragments = {
"add_comment_form": UECommentCreateView,
}
fragments = {"add_comment_form": UECommentCreateView}
def get_template_names(self) -> list[str]:
is_fragment = self.request.headers.get("HX-Request", False)
return (
["pedagogy/fragments/ue_detail/ue_detail.jinja"]
if is_fragment
else ["pedagogy/ue_detail.jinja"]
)
def get_fragment_data(self):
return {
"add_comment_form": {"ue_id": self.object.id},
}
return {"add_comment_form": {"ue_id": self.object.id}}
def get_context_data(self, **kwargs):
return super().get_context_data(**kwargs) | {