From c2931aa81f55927925095dc78f0cfc5aaa9e89e7 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Fri, 17 Sep 2021 13:55:23 +0200 Subject: [PATCH] Fix JsonDetailView --- shared/json/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/json/views.py b/shared/json/views.py index dd2363e..5e5df85 100644 --- a/shared/json/views.py +++ b/shared/json/views.py @@ -55,7 +55,9 @@ class JsonDetailView(JsonMixin, SingleObjectMixin, TemplateResponseMixin, View): def get(self, request, *args, **kwargs): self.object = self.get_object() context = self.get_context_data(object=self.object) - return self.render_to_json(html=self.render_to_response(context)) + return self.render_to_json( + html=self.render_to_response(context).rendered_content + ) class JsonDeleteView(JsonMessageMixin, JsonDetailView):