Skip to content

Commit 3493acd

Browse files
committed
Merge branch 'release/1.5.2'
2 parents d5e0d74 + 8322793 commit 3493acd

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Change Log
22

3+
## [1.5.2](https://github.com/crucialfelix/django-ajax-selects/tree/1.5.2) (2016-10-19)
4+
[Full Changelog](https://github.com/crucialfelix/django-ajax-selects/compare/1.5.1...1.5.2)
5+
6+
**Fixed bugs:**
7+
8+
- Occasionally: $.ui.autocomplete is undefined [\#188](https://github.com/crucialfelix/django-ajax-selects/issues/188)
9+
10+
**Closed issues:**
11+
12+
- No cache management headers in HTTP response [\#187](https://github.com/crucialfelix/django-ajax-selects/issues/187)
13+
314
## [1.5.1](https://github.com/crucialfelix/django-ajax-selects/tree/1.5.1) (2016-10-13)
415
[Full Changelog](https://github.com/crucialfelix/django-ajax-selects/compare/1.5.0...1.5.1)
516

ajax_select/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""JQuery-Ajax Autocomplete fields for Django Forms."""
2-
__version__ = "1.5.1"
2+
__version__ = "1.5.2"
33
__author__ = "crucialfelix"
44
__contact__ = "[email protected]"
55
__homepage__ = "https://github.com/crucialfelix/django-ajax-selects/"

ajax_select/static/ajax_select/js/ajax_select.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
window.addEventListener('load', function() {
1+
(function() {
22

33
var $ = window.jQuery;
44

@@ -245,4 +245,4 @@ window.addEventListener('load', function() {
245245
});
246246
});
247247

248-
}, {once: true});
248+
})();

ajax_select/static/ajax_select/js/bootstrap.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
}
99

1010
function loadJS(src) {
11-
var script = document.createElement('script');
12-
script.src = src;
13-
document.head.appendChild(script);
11+
document.write('<script type="text/javascript" src="' + src + '"><\/script>');
1412
}
1513

1614
function loadCSS(href) {

ajax_select/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ def ajax_lookup(request, channel):
4646
} for item in instances
4747
])
4848

49-
return HttpResponse(results, content_type='application/json')
49+
response = HttpResponse(results, content_type='application/json')
50+
response['Cache-Control'] = 'max-age=0, must-revalidate, no-store, no-cache;'
51+
return response

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name='django-ajax-selects',
12-
version='1.5.1',
12+
version='1.5.2',
1313
description='Edit ForeignKey, ManyToManyField and CharField in Django Admin using jQuery UI AutoComplete.',
1414
author='Chris Sattinger',
1515
author_email='[email protected]',

0 commit comments

Comments
 (0)