Fix JsonDetailView

This commit is contained in:
Tom Hubrecht 2021-09-17 13:55:23 +02:00
parent a621bb8197
commit c2931aa81f

View file

@ -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):