django-select2
django-select2 copied to clipboard
This is a Django integration for Select2
It would be useful to have a way to override or add additional data to the results returned by AutoResponseView for particular widgets. The use case is processing the `select2:select`...
**Describe the bug** Hi, dependent fields functionality does not work in the formset. I debugged this and found an issue in `django_select2.js` file, I added the description as a comment....
I labeled this as minor because I didn't take into consideration all use cases but my private one, though I do think it answers most of the needs. this is...
How to prepopulate the selected choices in HeavySelect2MultipleWidget and ModelMultipleChoiceField
**Goal** How to pre populate multiple selected choices in HeavySelect2MultipleWidget and in ModelMultipleChoiceField **Problem** When form reloaded with validation error, all the pre selected choices will vanish for HeavySelect2MultipleWidget, ModelMultipleChoiceField...
**Describe the bug** Hi @codingjoe I assume it is something related to this [issue](https://github.com/applegrew/django-select2/issues/565). `empty_label` is not displays for the ModelSelect2MultipleWidget on page loads, but if I select one of...
Hi @codingjoe, I faced an issue using `to_field` option in the model field. Form can't be validated at all. ``` class ModelA(models.Model): id = models.AutoField(primary_key=True) slug = models.CharField(max_length=4, unique=True) class...
it would be nice to have configurable clearing of dependent field on various events by now only select event is clearing dependent fields https://github.com/codingjoe/django-select2/blob/bfc9313af4a738ca22580dc124916f9c4b0a4c5e/django_select2/static/django_select2/django_select2.js#L60 in my use case i need...
I think, that is not good idea to hardcode filter used in dependent field to filter queryset this line: https://github.com/codingjoe/django-select2/blob/bfc9313af4a738ca22580dc124916f9c4b0a4c5e/django_select2/views.py#L57 is adding this hardcoded filter `__in` but in my use...
### Bug Description When using django-select2 in the Django Admin (regardless of the value of settings.LANGUAGE_CODE) the corresponding i18n file (e.g. en.js) throws the following exception in the brower console:...
As already [discussed](https://github.com/codingjoe/django-select2/discussions/290), the documentation of this widget is lacking. This PR adds a description of the functionality provided by the widget.