Commit Graph

388 Commits

Author SHA1 Message Date
Andrew Dodd 89674ec375 Update conf.py
Minor copy-paste error.

Closed #240
2015-12-17 10:15:11 +01:00
Andrew Dodd e655ed7a59 Add setting to change source of select2 assets
These changes introduce additional (optional) configuration parameters.
The parameters allow the user of the library to select different JS/CSS
libraries from the ones shipped. In particular, this allows serving from
the local server and/or in private-network-only environments.

Refs #220
Closed #239
2015-12-15 19:57:48 +01:00
Elijah Karari 3c06873148 Replace "patterns" with list in url config
`django.conf.urls.patterns` has been remmoved in Django 1.9.

Closed #236
2015-12-10 16:05:29 +01:00
Johannes Hoppe 84e1abaf4e Remove model_mommy test dependency 2015-12-02 20:05:38 +01:00
Johannes Hoppe 6ebeb4c6d7 Fixed pep257 issues 2015-12-02 19:40:14 +01:00
Johannes Hoppe 7d8a7e7a9f Fixed pytest setup on travis 2015-12-02 19:32:28 +01:00
Johannes Hoppe 9ba75bb820 Updated test suite for python 3.5 support 2015-12-02 19:28:16 +01:00
Johannes Hoppe cfc7c2c541 Added pip-tools for requirement manageing
Updated requirements
2015-12-02 19:27:23 +01:00
Johannes Hoppe 6c5e2036ca Updated test suite and setup file for Django 1.9 release 2015-12-02 18:57:28 +01:00
Johannes Hoppe 4defb8112b Fixed #222 -- Display intital data for heavy widgets 2015-12-01 10:19:02 +01:00
Johannes Hoppe bb90be77b7 Fixed #231 -- Avoid fetching entire queryset from db
Patched ciritcal memory leak in ModelSelect2 widgets.
Boolean evaluation of queryset makes django fetch all
elements.

Thanks to @magicjohnson for discovering this issue
2015-11-30 13:17:02 +01:00
Johannes Hoppe 18647161a1 Fixed docs 2015-11-29 20:47:22 +01:00
Royendgel Silberie 3e6c1fc3ba fixing small typo
Closed #227
2015-11-29 20:03:01 +01:00
Johannes Hoppe 19a8d63bb1 Refactors tag widgets and adds light tag widget
Currently there was no light version of the tag widget.
A light version might come handy if you use a postgres
`ArrayField` and a corresponding `SimpleArrayField`.

Resolved #226
2015-11-23 11:54:51 +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
Anne Fleischer 974ba552b0 Converted initialization code into configurable jQuery plugin
Closed #211
2015-11-12 12:50:58 +01:00
Thomas Schreiber 2beb5d23c7 Fix HeavySelect2TagWidget to respect custom attrs and default overrides
Closed #214
2015-10-27 17:44:22 +01:00
Johannes Hoppe b8d53aa714 Added v5.2.0 changelog 2015-10-05 19:34:52 +02:00
Johannes Hoppe b0d2325c43 Resolved #209 -- Added pagination 2015-10-05 19:01:43 +02:00
Johannes Hoppe 9d1bcfee6a Fixed flake8 error 2015-10-05 19:01:21 +02:00
Johannes Hoppe 2c1eb8bc4a Fixed -- IndexError: pop from empty list 2015-10-05 12:59:35 +02:00
Johannes Hoppe a91e66bf9e Created v5.1.0 release 2015-10-01 14:09:41 +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 dc81c2b3b5 Added search term splitting 2015-10-01 13:05:52 +02:00
Johannes Hoppe 48ea7549a6 Freeze dev requirements to avoid travis error 2015-10-01 13:01:52 +02: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 4d484163c2 Fixed packaging error 2015-09-29 15:12:57 +02:00
Johannes Hoppe 85f76d7ba5 Added external_req for read the docs 2015-09-29 14:51:57 +02:00
Johannes Hoppe e184f5fea6 Bump version number because v5.0.0 was taken on pypi due to mistake 2015-09-29 14:46:43 +02:00
Johannes Hoppe f301dc6f9d Added documentation 2015-09-29 14:33:06 +02:00
Johannes Hoppe 5dfd8553cc Added tests 2015-09-29 13:55:05 +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 29c74ae63e Fixed version number an changelog 2015-09-25 11:39:04 +02:00
Nirupam Biswas 905f691e01 New release updates 2015-09-25 00:27:03 +05:30
Johannes Hoppe b9400e235b Merge pull request #197 from DMOJ/static-patch
Make static work with CachedStaticFilesStorage
2015-08-27 10:48:53 +02:00
Quantum 5137c043ed Make static work with CachedStaticFilesStorage
`django.templatetags.static.static` doesn't return the hashed URL,
but `django.contrib.staticfiles.templatetags.staticfiles.static` does.
2015-08-26 16:38:26 -04:00
Johannes Hoppe 992ad4de01 Merge pull request #191 from bubenkoff/patch-1
Force unicode for widget choice labels
2015-08-11 16:30:34 +02:00
Anatoly Bubenkov e829422a3f avoid deprecated force_unicode 2015-08-10 14:19:46 +02:00
Anatoly Bubenkov 91160484ac correct force to use unicode 2015-08-10 09:42:08 +02:00
Anatoly Bubenkov d9c4a2cd5a Force unicode for widget choice labels 2015-08-10 09:39:02 +02:00
Johannes Hoppe 66a36c3ea2 Added tests for django master 2015-08-06 10:10:44 +02:00
Johannes Hoppe 4f84f01434 Fixed badges 2015-07-10 10:20:14 +02:00
Johannes Hoppe 68a6f44171 Added badges and moved changelog into separate file
Closed #188
2015-07-10 10:16:50 +02:00
Razi Alsayyed b576bcdd9e Made widget media a dynamic property
Symptoms:
While using AutoModelSelect2Field in admin site, I noticed that css files are rendered only at the first request to the add or edit forms, after that the widget is rendered but without loading any css files from get_select2_css_libs.

Solution:
I changed assets loading from Assets as a static definition to Media as a dynamic property as described at Django docs:
https://docs.djangoproject.com/en/1.8/topics/forms/media/#media-as-a-dynamic-property

Closed #179

Squashed commit of the following:

commit f925ed4a118687b82b6f61d21a9104ccf00859c8
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Fri Jun 19 01:39:47 2015 +0300

    remove trailing whitespace from docstrings

commit b3f6553e422e19c8e065e026511c4ffd91ffee42
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Fri Jun 19 01:35:15 2015 +0300

    Remove blank lines from docstrings

commit 4490b78572a25069472933c88ebee48445b59972
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Fri Jun 19 01:19:38 2015 +0300

    construct Media the right way

    Remove code that access private attributes of Media class.

commit 6697cd734daca62ff099be73d0685ce6af32e53d
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Tue Jun 16 00:11:29 2015 +0300

    fix

    change _media to _get_media

    I hope it is the final commit :)

commit 59bda01aed44e5658825a1bfe37ad09c5760a3ad
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Tue Jun 16 00:09:35 2015 +0300

    get_select2_heavy_js_libs

    change get_select2_js_libs to get_select2_heavy_js_libs

commit 993e201355c9d5a6012e6f67cfa64462576c2570
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Tue Jun 16 00:07:57 2015 +0300

    fix

    fix

commit f66e5f40b9f4df295bc5aaa7f2aafe588b2c41bb
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Mon Jun 15 23:55:53 2015 +0300

    fix

    fix

commit d33d90278345bc32e80e20bdf782fd9ac5eb1800
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Mon Jun 15 23:47:25 2015 +0300

    fix

    fix

commit f6d956149d2e99ee504c7b2c110f959f7472a181
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Mon Jun 15 23:45:09 2015 +0300

    fix

    fix

commit 6d737a78cc07507c5b9b91736f6662b5f6f31c57
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Mon Jun 15 23:40:01 2015 +0300

    global name 'Media' is not defined

    global name 'Media' is not defined

commit 661a817b092dc72bfa8df1a5458d474599c0a50e
Author: Razi Alsayyed <razi.sayed@gmail.com>
Date:   Mon Jun 15 23:27:27 2015 +0300

    Media as a dynamic property

    **Symptoms:**
    While using AutoModelSelect2Field in admin site, I noticed that css files are rendered only at the first request to the add or edit forms, after that the widget is rendered but without loading any css files from get_select2_css_libs.

    **Solution:**
    I changed assets loading from [Assets as a static definition](https://docs.djangoproject.com/en/1.8/topics/forms/media/#media-as-a-dynamic-property) to [Media as a dynamic property](https://docs.djangoproject.com/en/1.8/topics/forms/media/#media-as-a-dynamic-property) as described at Django docs.
2015-06-19 14:49:51 +02:00
Johannes Hoppe a38eb1168b Changed travis tests to supported versions 2015-06-17 17:06:20 +02:00
Johannes Hoppe 1d49045477 Merge pull request #177 from blueyed/doc-fixes
doc: fix typos/grammar
2015-06-08 14:54:47 +02:00
Daniel Hahler de37752ac6 doc: fix typos/grammar 2015-06-08 11:35:09 +02:00