code: def render_to_response(self, context, **response_kwargs):
          
          if self.request.is_ajax():
              data = {
                  "content": render_to_string(
                      self.get_template_names(), context, request=self.request)
              }
              return JsonResponse(data)
          if settings.DEBUG:
              return super(PartialAjaxMixin, self).render_to_response(
                  context, **response_kwargs)
          raise Http404()
docs: Returns the rendered template in JSON format