code: def build_attrs(self, *args, **kwargs):
          
          attrs = super(HeavySelect2Mixin, self).build_attrs(*args, **kwargs)
  
          # encrypt instance Id
          self.widget_id = signing.dumps(id(self))
  
          attrs['data-field_id'] = self.widget_id
          attrs.setdefault('data-ajax--url', self.get_url())
          attrs.setdefault('data-ajax--cache', "true")
          attrs.setdefault('data-ajax--type', "GET")
          attrs.setdefault('data-minimum-input-length', 2)
          if self.dependent_fields:
              attrs.setdefault('data-select2-dependent-fields', " ".join(self.dependent_fields))
  
          attrs['class'] += ' django-select2-heavy'
          return attrs
docs: Set select2's AJAX attributes.