docs: def get_ajax_xeditable_choices(self, request, *args, **kwargs):
          """ AJAX GET handler for xeditable queries asking for field choice lists. """
          field_name = request.GET.get(self.xeditable_fieldname_param)
          if not field_name:
              return HttpResponseBadRequest("Field name must be given")
  
          queryset = self.get_queryset()
          if not self.model:
              self.model = queryset.model
  
          # Sanitize the requested field name by limiting valid names to the datatable_options columns
          from datatableview.views import legacy
          if isinstance(self, legacy.LegacyDatatableMixin):
              columns = self._get_datatable_options()['columns']
              for name in columns:
                  if isinstance(name, (list, tuple)):
                      name = name[1]
                  if name == field_name:
                      break
              else:
                  return HttpResponseBadRequest("Invalid field name")
          else:
              datatable = self.get_datatable()
              if not hasattr(datatable, 'config'):
                  datatable.configure()
              if field_name not in datatable.config['columns']:
                  return HttpResponseBadRequest("Invalid field name")
  
          field = self.model._meta.get_field(field_name)
          choices = self.get_field_choices(field, field_name)
          return HttpResponse(json.dumps(choices))