Commit graph

24 commits

Author SHA1 Message Date
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
4dacbdf283 enchant the docs -- adds spell checking 2016-02-04 11:48:59 +01:00
Johannes Hoppe
d57b726d34 Adds napoleon to march to google style signatures 2016-02-04 11:48:07 +01:00
Johannes Hoppe
4a1b83ad1e Fixes security bug and adds secruity documentation
An attacker was able to use a `field_id` from a "secret" field
and use if on any even the default public select2 view and
receive the data without authentication.
2016-01-26 13:18:36 +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
6ebeb4c6d7 Fixed pep257 issues 2015-12-02 19:40:14 +01:00
Johannes Hoppe
b0d2325c43 Resolved #209 -- Added pagination 2015-10-05 19:01:43 +02:00
Johannes Hoppe
75c8c38e2d Impooved cacheing to reduce pickling issues
Not not the entire widget gets cached nor the entire queryset.
The query and gets pickeld separately.
2015-10-01 14:07:51 +02:00
Johannes Hoppe
f301dc6f9d Added documentation 2015-09-29 14:33:06 +02:00
Johannes Hoppe
f80abb10f2 Added allow-clear support 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
Johannes Hoppe
33b7dffca1 Removed own caching solution in favour of django caching
The old multiprocessing support was hard to maintain.
Since signing and caching are part of `django.core`
there is really no need to stick to our own solution.

As a result multimachine support and security are now always in place.
Fields are stored in Django's cache. The default cache used by select2
is called 'default' but can be cachanged overwriting the setting
`SELECT2_CACHE_BACKEND`.

Recommended cache backends are memcached, redis or a DB-cache.

Refactored AutoResponseView

The main reason for this refactoring is
the fact that the pagingnation was slow.

I dropped major parts of the initial code
and wrote a more django-like-approach.

Noteabley:
- get_results now retuns a QuerySet
- This commit drops django 1.6 support in favour of the JsonResponse (Backporting is possible).
2015-09-29 13:53:29 +02:00
Johannes Hoppe
d988cc683e Removed method check because it done by dispatch 2015-04-10 10:16:01 +02:00
Johannes Hoppe
bd40acc761 Added six types and fixed setup 2015-03-31 10:22:03 +02:00
Johannes Hoppe
2cfbfd3325 Code cleanup -- Added pep8 tests for package. 2015-03-30 10:19:37 +02:00
fjcapdevila
4edeff61af Fix another typo
FIx another typo in a doc-string
2014-06-09 18:15:31 -03:00
Agris Ameriks
5db7791b20 Removed empty term validation.
Why are you validating that term is filled? If I want to suggest values immediately after opening select2 input, I specify select2_options {"minimumResultsForSearch": 0, "minimumInputLength": 0,}.

Why isn't this valid case? Maybe I'm missing something, but see it very useful to suggest, for example, last used values immediately after opening select2 field.

Thanks!
2013-09-06 18:55:11 +03:00
Stefan Foulis
fdbf724761 adds extra_data support for AutoModelSelect2Field
allows passing data structures in ajax requests that can be used for custom formatting
2012-12-13 14:20:08 +01:00
AppleGrew (applegrew)
8169db806b * Sphinx docs added. * Fixed Issue 4 * Improved code docstrings 2012-08-31 11:34:23 +05:30
AppleGrew (applegrew)
8579993107 v1.1 changes.
Lots of fixes and redesign. Also added a full fledged project for
testing out the components.
2012-08-19 23:13:15 +05:30
AppleGrew (applegrew)
d5aa9b5ddb Enhanced Heavy fields. Added 'auto' fields. Some bug fixes. 2012-08-05 13:00:44 +05:30
AppleGrew (applegrew)
30082bb8ed Initial commit 2012-07-24 01:44:55 +05:30