Commit graph

16 commits

Author SHA1 Message Date
predatell
8bd7f7209f Try to get queryset form choices, if possible (#509)
Get queryset for model widgets from choices. This omits the need to explicitly supply a queryset or model to the widget.
2019-07-09 18:38:59 +02:00
Mario Frasca
c15de464d5 Fix #544 -- Ensure correct attribute defaults (#547)
dict.setdefault() does not change the default value if called twice.
Therefore, defaults need to passed to the super call instead.
2019-06-10 17:09:04 +02:00
Johannes Hoppe
9b54cc30c7 Add Django 2.2 support
Add Django 2.2 LTS support
Drop Django 1.11 LTS support
Add request argument to `ModelSelect2Mixin.filter_queryset`
2019-03-23 13:57:13 +01:00
Johannes Hoppe
f31beec0c4
Add support for custom to_field names for foreign keys (#486)
Django's ForeignKey supports custom to_fields. The to field is the
primary key by default, but can be modified. The to field is also
used by forms to reduce database lookups.

This patch add support for custom to_field names on both model or
form layer.
2018-06-30 14:56:32 +02:00
Johannes Hoppe
f967eb643b Drop Python 2 support 2017-11-25 18:56:46 +01:00
Alexey Ruzin
1931a98240 Chained select2 2017-04-18 10:57:33 +02:00
Johannes Hoppe
09110a5460 Fix syntax 2017-02-21 15:07:19 +01:00
Johannes Hoppe
f943fe07f5 Fixes #256 -- Don't render empty option for multiselect (#275) 2016-05-23 16:17:31 +02:00
Damir Arbula
9ed8f58fa6 Fixes #260 -- Normalize choices keys and selected choices to strings 2016-03-01 10:08:41 +01:00
mostafa-anm
33a00c1e39 Fixed #218 -- Add custom label support
Added `label_from_instance` method for model widgets to define custom option labels.

Closed #233
2016-01-19 08:50:09 +01:00
Johannes Hoppe
4defb8112b Fixed #222 -- Display intital data for heavy widgets 2015-12-01 10:19:02 +01:00
Anne Fleischer
0457617738 Fixed javaScript bug for multiple different select2 fields on one page
Closed #224
2015-11-18 00:03:02 +01:00
Johannes Hoppe
485ea191cb Fixed filter_queryset bug
The reduce statement coundn't handle multiple lookup strings.
2015-09-30 10:28:37 +02:00
Johannes Hoppe
5dfd8553cc Added tests 2015-09-29 13:55:05 +02:00
Johannes Hoppe
6dad55eb11 Upgrade to select2 4.0 2015-09-29 13:55:05 +02:00
Johannes Hoppe
95297a362e Radical removal of all unneeded code 2015-09-29 13:54:23 +02:00
Renamed from tests/testapp/forms/__init__.py (Browse further)