[UPDT] HORILLA_VIEWS: Updated HorillaFormView class get_context_data function by adding hx_target in context

This commit is contained in:
Horilla
2025-08-02 12:21:28 +05:30
parent 232e469a2b
commit 72888d68b6
2 changed files with 71 additions and 76 deletions

View File

@@ -1898,6 +1898,7 @@ class HorillaFormView(FormView):
context["form_class_path"] = self.form_class_path
context["view_id"] = self.view_id
context["hx_confirm"] = self.hx_confirm
context["hx_target"] = self.request.META.get("HTTP_HX_TARGET", "this")
pk = None
if self.form.instance:
pk = self.form.instance.pk