code: def captcha_refresh(request):
      
      if not request.is_ajax():
          raise Http404
  
      new_key = CaptchaStore.pick()
      to_json_response = {
          'key': new_key,
          'image_url': captcha_image_url(new_key),
          'audio_url': captcha_audio_url(new_key) if settings.CAPTCHA_FLITE_PATH else None
      }
      return HttpResponse(json.dumps(to_json_response), content_type='application/json')
docs: Return json with new captcha for ajax refresh request