forked from yourlabs/django-autocomplete-light
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGELOG
447 lines (304 loc) · 15.3 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
2.0.a9:
- Fix #219: autocompletes now convert None value to an empty list, as
Autocomplete promises that values is a list. (Fixed gfk in inlines)
- Fix #226: improved css/js positioning.
- Fix #231: widget.js was re-initializing widgets.
- Fixed taggit support
- Fix: label was not set for gmtm and gfk in inlines.
2.0.0a8:
- Updated pt_BR translation contributed by Fábio C. Barrionuevo da Luz (@luzfcb).
2.0.0a7:
- Removed a layer of complexity by trading autocomplete_js_attributes and
widget_js_attributes for attrs (for input/autocomplete object) and widget_attrs
(for widget container/widget js object).
- Fixed naming conventions issues:
- #124: css class .choiceDetail should be .choice-detail, same for
.choiceUpdate
- #97: rename .div css class to .block,
- Fixed #84: data-autocomplete-placeholder is gone in favor of the
placeholder attribute.
- Fixed #82: data-* is not parsed anymore by yourlabs.Widget, data-widget-*
is parsed for options instead.
- Fixed #81: js Autocomplete object now parses data-autocomplete-* for
options,
- Fixed #80: js maxValues is now maximumValues.
- Fixed #27: refactored selenium tests to be able to test any example app.
- Bugfix: get_autocomplete_from_arg returned wrong autocomplete in two cases
2.0.0a6:
- Simplified widget template selection.
2.0.0a5:
- Support for Django 1.6's ModelForm.Meta.fields = '__all__', generic fk
and generic m2m autocomplete fields were not created.
2.0.0a4:
- Fix #204: Restore AutocompleteModelBase as default,
- Fix #205: Support Python3 in views,
- Fixed 404 response in AutocompleteView.
2.0.0a3:
- Do not interfere with non-autocomplete-enabled form fields,
- Ported taggit support to Python3,
- Renamed TaggitTagField to TaggitField and integrated TaggitField into
autocomplete_light.ModelForm,
2.0.0a2:
- Make AutocompleteModelTemplate the default autocomplete base for models.
- Added ChoiceField and MultipleChoiceField.
- Renamed .div class to .block, backward compatibility is preserved.
- BC Break: Restyled autocomplete widget to look more modern. If you want
the old style back, include autocomplete_light/old_style.css.
2.0.0a1:
- Fix #168: ensure that autocompletion inputs behaves like django
when it comes to values that were removed from the queryset.
2.0.0pre:
There are minor backward compatibility breaks due to the
reorganization of form classes. The best way to upgrade is to
inherit from autocomplete_light.ModelForm.
- autocomplete_light.FixedModelForm was renamed to
autocomplete_light.SelectMultipleHelpTextRemovalMixin and is now
a mixin for ModelForm. Inherit from both that and
django.forms.ModelForm to get the same.
- GenericModelForm was renamed to
GenericM2MRelatedObjectDescriptorHandlingMixin and is now a mixin
for ModelForm. Inherit from both that and django.forms.ModelForm
to get the same.
- get_widgets_dict is gone, because we now favor using form fields
which do validation where it's due: on POST.
- using widgets should still work, but using the new form fields is
better because it enables DRY validation: you don't have to
hardcode the queryset on the form field definition anymore.
To fix those, just inherit from autocomplete_light.ModelForm if
possible, else check the form API details in the source or
generated API documentation:
- http://django-autocomplete-light.readthedocs.org/en/v2/form.html#module-autocomplete_light.forms
New features:
- Added form fields, which are now in charge of validation,
- Added ModelForm which includes all features previously provided as
separated tools (generic m2m support, django issue #9321, etc, etc ...)
and overrides django's form field generator to automatically use
autocomplete fields when possible, even for generic relations.
- Python3 support.
- Tests rely on apps provided in the autocomplete_light.tests.apps
submodule instead of those provided by test_project. This make tests
potentially runnable on a user project (except that the user project
still needs to add those apps in INSTALLED_APPS).
1.4.9: Fix #193: IE8 support hacks.
1.4.8: Fix #195: RegistryView got broken on recent Django versions.
1.4.7:
- Fix #190: Remove Django 1.6 Depreciation Warning,
- Fix #189: Fixed support for USE_THOUSAND_SEPARATOR.
1.4.6:
- Fix #188: Added debouncing in autocomplete.js,
- Fix #173: load static from staticfiles.
1.4.5:
- Fix #180: Support HTTPS in remote.js,
- Fix #184: Mouse support upgrade in focus management,
- Fix #182: Removed hard-coded class="" attribute.
1.4.4: Improved IE7 and IE8 support, thanks @rhunwicks
1.4.3:
- Fix Added option clearInputOnSelectChoice, patch by @vosi
- Fix uninitialized js key, patch by @vosi
- Escape choices before putting them in html, patch by @voidus
- Added Simon Kohlmeyer to AUTHORS (Volodymyr was there already).
1.4.2 Fix #164: Support iterables in AutocompleteModel.order_by.
1.4.1
- Fix #163: Use ._default_manager instead of .objects. Thanks @kakulukia
1.4.0
- BC Break: Default split_words to False again, to **not** match behaviour
from django.contrib.admin which is definitively too naive. (Thanks
kezabelle for helping in this decision). This means that the default
behaviour is like pre-1.3.0 again.
- Enable split_words='or' to use "OR" conditions on splitted words.
- Set order_by=None by default in AutocompleteModel.
- Added missing docstrings.
- Made it easier to spot failing tests.
- Covered all combinations with tests.
1.3.1
- Support django 1.5 RelatedFieldWidgetWrapper in
FixedModelForm,
- Support django-responsive-admin theme (and probably many
other customisations) by adding a div with clear:both after
the widget.
1.3.0
- BC Break: Default split_words to True, to match behaviour from
django.contrib.admin.
- Added split_words and improved search_fields support for
AutocompleteGeneric.
- Fix #161: Avoid focusing on next field on widget initialization.
1.2.6 Fixed wrong docstring.
1.2.5 Raise AutocompleteNotRegistered instead of KeyError in
Registry.__getitem__.
1.2.4 @g1itch: Support hyphens in generic autocomplete object pks.
1.2.3 @mislavcimpersak: Croatian i18n
1.2.2 @g1itch: Rusisan i18n
1.2.1 @jojax: Fix innefective test on is popup, in autocomplete CreateView
1.2.0
- Fix #132: removed dead line of code, and restored compatibility with
autocomplete-light <1.1.29,
- Implement #136: AutocompleteModel.split_words
- Auto-hilight the first choice.
- Fix #135: AutocompleteModel is not compatible with Django 1.3
1.1.31 Fix #129: Firefox support in JS positioning code.
1.1.30 Polish translation contributed by Michał Pasternak.
1.1.29 Fix #126: support .clone(true) with values.
WARNING: This version broke cloning widgets in some cases. This was reported in
#132 and fixed in 1.2.0.
1.1.28 Regression fix: hide choiceDetail and choiceUpdate from the autocomplete
box.
This fixes the default model template, see in test_project:
http://localhost:8000/admin/default_template_autocomplete/testmodel/add/
The test_project now includes demos created by Michał Pasternak. Thankssss !
1.1.27 Fix #117: django-grappelli support.
Contributed by Michał Pasternak.
1.1.26
- Fixed #114: Use widget_template attr only when set.
- Fixed #111: Support jQuery's clone(true).
1.1.25 Fixed #108: generic inline support.
1.1.24
- Allow to override the default AutocompleteModelBase class used by register()
- Implemented django-hvad support
1.1.23: Removed django from install_requires, fixes pip install -U
1.1.22: Fixed DeprecationWarning for Django 1.5.
1.1.21 Bugfix: box was not re-shown after inputing twice the same string
of minimumCharacters length.
1.1.20 Click on modal overlay closes the popup windo
1.1.19 Make add-another popup a modality
1.1.18 Center add-another popup on screen
1.1.17 Update fr locale
1.1.16 Django 1.5 compatibility. Credit: Patrick Taylor
1.1.15 Fix #99: choices kwarg was ignored
1.1.14 Bugfix: fetchComplete now ready for textStatus == 'abort'
1.1.13
- Enhancement #78: search_fields more like admin,
- Bugfix: closed brackets in style.css (thanks papalagichen)
1.1.12 Enabled CSRF.
1.1.11 Fixed dynamic initialisation (ie. inlines).
Bug was caused by a wrong attempt at migrating from jq17 live() to jq19 on().
1.1.10
- Partial autocomplete.js rewrite using ideas from bootstrap-typeahead.js,
- Use of $.proxy() which allowed to get rid of many scope hacks like: var
autocomplete = this;
- When the maximum number of choices has been selected and the input goes,
automatically focus on next visible field,
- Do not show autocomplete if input has below minCharacters,
- CSS rewrite/debloat (~-50% SLOCs),
- Backported typeahead CSS,
- Backported typeahead autocomplete box placement strategy, hoping to fix IE10
mobile support,
- jQuery 1.9 support (thanks Nicolas Seinlet for the heads up).
1.1.9
- Use explicit check for None value instead of trueness, allowing pk=0 (thanks
@ekohl).
- Widget requires proper url setup (thanks @emesik).
- Rewrote keypress handler using recent contributions.
Also credits to @ekohl and @emesik for working on keypress handling (added to
AUTHORS).
1.1.8 (was not released on PyPi)
- Alias autocomplete_light.FixedModelForm to autocomplete_light.ModelForm.
1.1.7 Reset default hideAfter to 500, or click support is half broken.
1.1.6
- Fix #77: autocomplete.js "was not as good as bootstrap typeahea",
- Fix #72: use prototypes in JS to make code faster
Credit to Gennady (@geaden) for having the guts to criticize autocomplete.js.
1.1.5
- Added blocks in autocomplete_light/widget.html which makes it easier to
extend - without boilerplate.
- Refactor CreateView to make it easier to extend.
- Added widget.extra_context to make it easier to add context to the widget
template.
1.1.4 Enter submits the form is there is no selected choice.
Added to AUTHORS: Ewoud Kohl van Wijngaarden
1.1.3 Fix #71: Refactor HTML generation parts in widget.js
1.1.2
- Fix #68: bug when using TextInput with a custom class,
- Fix #30: exclude already selected items from model autocomplete,
- Fix #60: got rid of updateWidgets(),
- Fix #63: default template for AutocompleteModelTemplate,
1.1.1
- Added option to disable watch of autocompletes hidden selects,
- Performance improvement on inlines,
- Provide: autocomplete_light.FixedModelForm,
- Allow override of form kwarg in modelform_factory,
- taggit support: warn that commit=False is not supported by TagField,
- Optimize updateWidgets with the help of DOMNodeInserted,
- Avoid ImproperlyConfigured when using CreateView directly for popups only,
- Mentioned python 2.6 support,
- Django 1.5 support in test project
1.1.0 BC break in templates.
- Fix #51, replaced <div> tags by <span class="div">, this
enables rendering the widget in inline tags such as with {{
form.as_p }}, and also makes it valid HTML.
- Fix #58, remove restrictions in choices_for_values.
- Added to AUTHORS: Marc Hörsken.
1.0.26 Fix #25: Prevent accidental inclusion of autocomplete_light/static.html
1.0.25 Added support for django-taggit in django.contrib.taggit_fields.
1.0.24 Added pt_BR translation, thanks Fábio C. Barrionuevo da Luz.
1.0.23 Added FixedModelForm, workaround django issue #9321.
1.0.22 Fix #46: $.data striped leading zeros from data-value
1.0.21 Added addanother.js, allowing to 'add another' even outside the admin.
1.0.20 Added AutocompleteBase.empty_html_format and spanish translation.
1.0.19 Locale/UX improvements suggested by vibragiel.
1.0.18 CSS Improvements by Michal Pasternak
1.0.17 Fixed a bug with cache concerning keyboard navigation and dependent
autocompletes.
1.0.16 Added CharField autocompletion for comma separated values.
1.0.15 Holliday release
- Fix #31: Workaround firefox form tempering attitude on reload
- Fix #33: Rename LICENSE.txt to LICENSE
- Fix #34: STATIC_PREFIX changed to {% static %} in templates
- Fix #34: Added readme in russian
- Fix #36: Removed old javascript-placeholder code from widget.js
- Fix #38: Invalid CSS background property
- Added to AUTHORS: @balmaster, @vosi, Brant Young (I hope i didn't
forget anyone, if so please let me know)
Note that except for #31, fixes were provided by the community, thanks a
lot !
1.0.14 Added support for custom javascript initialization on autocomplete
creation, ie. inlines.
It is backward compatible, but you should migrate your custom javascript
to:
0) Use $(document).bind('yourlabsWidgetReady', ...) instead of
$(document).ready(...) to initialize autocomplete widgets
1) Use
$('.autocomplete-light-widget[data-bootstrap=...]').live('initialize', ...)
to instanciate autocomplete widgets instead of
$('.autocomplete-light-widget[data-bootstrap=...]').each(...)
See docs or remote.js for an example.
1.0.13 Use HTML5 placeholder, javascript API support for cloned widgets.
1.0.12 Fixed a crash when yourlabsAutocomplete was called on no element, fixed
div id and removed debug statement.
1.0.11 Fugbix AutocompleteRestModel could not rely only on uniques, so it
relies on get_or_create_by in that case
1.0.10 Fugbix models with a non numerical pk where not accepted anymore by a
spec, the spec was removed from tests and this case is fixed.
1.0.9 Bugfix in remote autocomplete
1.0.8 Fixed keyboard navigation, 1.0.7 broke tests
1.0.7 Tested support for autocompletes that depend on each other.
1.0.6 Enhancement: set class 'autocomplete-light-widget' to autocomplete outer
containers created by widget.js
1.0.5 Enhancement: made rest model local object fetcher less harsh when trying
to find a local object
1.0.4 Bugfix: registering a generic autocomplete with a custom name did not
use the custom name
1.0.3 Default search_names to 'name' if the model has a name field
1.0.2 Bugfix & refactor django admin + popup
1.0.1 Slight ergonomy improvement
1.0.0 (Almost) full rewrite
- "Channel" is gone in favor of "Autocomplete"
- More unit tests and new selenium tests
- Javascript rewrite, for consistency and documentation
- New view on /autocomplete_light/ allows admins to view the registry
0.6 No pity for insane bloat removal
Backward compatibility break: {% autocomplete_light_static %} was removed.
Instead, use {% include 'autocomplete_light/static.html' %} as demonstrated
in the "Quick start" documentation.
Note that autocomplete_light/static.html does not include
cities_light/autocomplete.js, so you have to load it yourself now.
0.5
No backward compatibility break.
- Bugfix in generic channel example: demonstrate how to query_filter on
multiple queryset types.
- Bugfix in GenericForeignKeyField: allow none value.
- Enhancement: autocomplete_light.contrib.generic_m2m supports generic many
to many relations.
- Enhancement: allow registration of model with custom channel attributes,
this allows to register a model with another "search_name" than "name"
without subclassing.
- Documentation improvements.