docs: def ajax_only(view_func):
      """Required the view is only accessed via AJAX."""
  
      @wraps(view_func, assigned=available_attrs(view_func))
      def _wrapped_view(request, *args, **kwargs):
          if request.is_ajax():
              return view_func(request, *args, **kwargs)
          else:
              return http.HttpResponseBadRequest()
      return _wrapped_view