forked from yourlabs/django-cities-light
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGELOG
414 lines (278 loc) · 12.8 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
TBR
2021-10-22 3.9.0
Removed Tracis CI
Fix SubRegionSerializer URL #257
Support for django 3.2 and python 3.9, 3.10
Upaded the version of all the libraries
Fix/import error #255
Python 2 tidy ups and removed mock dependency #249
Feature Allow to use natural primary/foreing keys for geoname objects #217
2020-10-22 3.8.1
Drop support of Django 2.0 and 2.1
Small improvements on documentation, codebase and CI
2020-08-28 3.8.0
Fix for subregion #229
Documentation improvement #221 #189
General improvements on warnings and pylint recomendations
Dropped support of Django 1.11
2020-08-06 3.7.0
Fix for subregion
Drop support for python 2
Changes dependency from django-autoslug-iplweb to django-autoslug, that
works with Django 3.1
2019-04-14 3.6.0
Add Subregion support by @adamb70 and @Guts
2019-04-14 3.5.1
Fix Django 3.0 and DRF 3.11+ support
2018-05-27 3.5.0
Fix lack of support of Django 2.0 by django_autoslug #174 by @wswld
Changes dependency from django-autoslug to django-autoslug-iplweb, that
works with Django 2.0, and which is maintained by @mpasternak
2018-02-15 3.4.0
- Drop support for django<1.8 and django-rest-framework<3.4
- Fix memory widget units on OS X
- Remove support for django-autocomplete-light v1 (#157)
- Update django-rest-framework and django-ajax-selects
- Use custom Django>=1.7 lookup to remove spaces from search query string
- Update model customization docs for Django 1.9
- Add timezone support
- Compatibility with Django 2.0
- Compatibility with Django 1.11
- Move name field to Base model, make not unique
- #136: Creating a ModelSerializer
- #127: Adds the possibility to customize the alternate_names separator
- Fix unidecode warning and add unit test for to_ascii
- Switch Country/Region/City lists to sets (speedup)
- Call connection.close() only for MySQL (speedup)
- Disable progressbar by default (speedup)
- Call reset_queries only in DEBUG mode (speedup)
- Make dump_fixture APP_NAME aware
- Adds migration step in README.rst
- improve help text formatting for management commands
- fix positional argument handling on django 1.10 for cities_light_fixtures command
2016-05-29 3.3.0
- #118: Add Django 1.10 support, drop Django 1.7 support by @jpic
- #113: Fix DeprecationWarning by @mbaragiola
- #106: New management command to work with fixtures by @max-arnold
- #108: translation_items_pre_import_signal by @FaBay89
- #106: New management command feature by @greeday2
2016-01-10 3.2.0
- #105: Drop LazyProgressBar, patch was accepted upstream by @max-arnold,
- #104: Better feature code filtering by @max-arnold,
- #100, #96: The mistery about migrations appearing in some
environments but not others has been solved: it was due to the
presence of b'' in migration files. A new test was added to fail if
django wants to create new migrations in any environment.
- Phone number was required to create a country, it's not anymore.
- Support Django 1.7 to 1.9, thanks @suquant for helping,
- Support for 1.7 will drop when 1.10 is released, unless someone
contributes compatibility in cities_light options declaration,
- Bugfix in import: some search names would not be generated in some
cases due to unpredictability of the iteration order on
translation_data.items()
- Test with django-dbdiff are much faster than importing the whole data
- Tox for testing, coverage
2015-04-02 3.1.2
Django 1.8 compatibility by @suquant
2015-03-23 3.1.1
Use named indexes for geonames data contributed by Alexey Evseev.
2015-03-04 3.1.0
Pluggable models feature contributed by Alexey Evseev.
2015-02-19 3.0.5
Added CITIES_LIGHT_INCLUDE_COUNTRIES setting.
2015-01-28 3.0.4
Windows support by forcing utf8 by Mikael Österberg.
2015-01-21 3.0.3
Django-restframework support updated by @moimael.
2014-11-24 3.0.2
Make db_index optional on City table. It generates the missing migration
files that was added in your current project.
2014-11-06 3.0.1
Fixed MySQL Django 1.7 migrations support.
2014-10-31 3.0.0
- #63: Django 1.7 support,
- Require Django >= 1.6 for django.db.transaction.atomic,
- Apparently stable MySQL support.
MySQL users should use 3.0.0.
PostgreSQL and SQLite users are free to keep on using 2.x.x which supports
Django >= 1.4.
2014-04-30 2.4.2
- #55: Warn users about SOUTH_MIGRATION_MODULES in migrations/__init__.py
- Django 1.7 on Python3 support.
2014-04-27 2.4.1
- setup.py was rm'ing cities_light/migrations.
2014-04-27 2.4.0
- Use django migrations by default (support django 1.7). To upgrade adjust
SOUTH_MIGRATIONS_MODULES.
- PEP0396 cities_light.__version__.
2014-04-06 2.3.1
- #42 added FAQ: Some data fail to import or don't import like I want, how
to skip them ?
- #45 django-rest-framework support update by @almalki.
- #49 Added country_items_pre_import and region_items_pre_import by
@mauricioabreu
- #51 Slug should be used in unique_together along with name.
- #51 Skip duplicate cities with no regions
- #52 Added FAQ on MySQL and UTF-8
- #53 Country phone prefix support by @csarcom
- Forms update.
2014-03-06 2.3.0
- Fix #50: added country_items_pre_import singal by @mauricioabreu
Apparently I've slightly messed up version numbers so we're starting over
at 2.3.0.
2014-02-24 2.2.13
- Fix #46: south migrations were not installed with django 1.6.
2014-02-24 2.2.12
- Fixed #43: load cities with the same name from different
regions, by @dpoirier
2014-02-02 2.1.11
- Django 1.7 support: remove migrations in pre-install.
2014-01-28 2.1.10
- Removed dependency_links
2014-01-27 2.1.9
- Changed a requirement version, let's hope that it works on weird
Python setups.
2013-12-12 2.1.8
- Bugfix: a django 1.7 migration from my WC made it in 2.1.7.
2013-12-12 2.1.7
- #37: Richard Barran fixed translation import progress bar.
2013-11-23 2.1.6
- #34: Greg Gaughan fixed model ordering.
2013-10-03 2.1.5
- Removed dead decorator.
2013-10-02 2.1.4
- Restored Python3 support broken by 2.1.2
- PostgreSQL support for feature introduced in 2.1.2.
2013-10-02 2.1.3
- Automatically force import unless cities_light command has completed
once.
2013-10-02 2.1.2
- Expect IntegrityErrors as they seem to be caused only by duplicates. A
non-blocking warning is logged instead.
2013-09-30 2.1.1
- Do not decorate Base subclasses with @python_2_unicode_compatible. See
https://code.djangoproject.com/ticket/21198
2013-09-27 2.1.0
- Added Python 3 support using
https://docs.djangoproject.com/en/dev/topics/python3/
- Added featurecode and population, contributed by Chris Vigelius (@chrisv2)
- Fixed ascii slug generation based on advice by Max Arnolds
- Import of cities1000.zip now tested automatically on sqlite, postgres and
mysql (python2 only) by travis.
Upgrade instructions:
pip install -U django-cities-light
./manage.py migrate cities_light
2013-07-30 2.0.9
Awesome contributions were merged:
- Fixed bug in city migration where if there were two cities in the same
country with the same name only the first would be imported. This was due
to not taking into account the region checking for the records existence
before creating a new one.
- Increase performance by caching region_id and country_id in migration
function variables.
- Added debugging flag '--verify-city-import' which cerifies city import
and print out missing cities. For debug purposes only.
- Fixed bug in city migration where if the name_ascii field is null it
would set the slug name as 'city.' It now sets it to the geoname_id.
- Added to AUTHORS: Mike Mepham, Jeff Rudokas
2013-06-26 2.0.8
- Merge #22: ugettext_lazy instead of ugettext.
- Added Aaron VanDerlip to AUTHORS.
- Promoted dev status to 5 Stable.
2012-10-26 2.0.7
- Bugfix: zips were not imported anymore because of a bug introduced in 2.0.6
2012-10-26 2.0.6
- Don't re-extract downloaded files over and over again,
- Bugfix: removed import of pympler
- Setup travis to test that database installation works on both postgres
and mysql. It was working indeed but we just have it continuously tested
now.
- Made --force less picky on arguments
2012-10-26 2.0.5
- Optimized cities_light command, from 400M of RAM used to 30M on
django-autocomplete-light's test project. Thanks sandino for reporting.
- Made --force-import less picky on arguments
2012-08-22 2.0.4
- Avoid indexing of search_names on MySQL
2012-08-22 2.0.3
- Hint the user about MySQL's issue with migration 0003
2012-07-12 2.0.2
- Wrap management command in a transaction. (contributed by Pi Delport)
2012-07-10 2.0.1
- Added support for q GET argument to contrib.restframework
2012-07-09 2.0.0
- Added support for django-autocomplete-light 1.0.0 in
contrib.autocompletes
2012-06-25 1.9.4
- Fixed south migration and PEP8.
- Some code for 2.0 accidently was in the previous release.
2012-06-12 1.9.3
Fixed contrib stuff.
2012-06-12 1.9.2
Fixed region import for malta.
2012-06-10 1.9.1
- Fixed chinese city name_ascii support
- Fixed support for regions without names
- to_search() now automatically called when filtering on
search_names
In 1.9.0, you had to query like::
City.objects.filter(search_names__icontains=to_search('Paris, Fra'))
In 1.9.1, passing the value through to_search() is automatic::
City.objects.filter(search_names__icontains='Paris, Fra')
Keep in mind that 'Paris, Fra' will be converted in 'parisfra',
which is useable against search_names column.
2012-06-07 1.9.0 Added Regions/states
- Run migrations: added Region, for USA state support because for example
there is a city called "Greenville" in almost every state.
- Remove CityAutocompleteWidget, in favor of a google-maps-like
autocomplete channel, which you can use with the normal widget.
- Update your querysets using search_names__icontains=some_value to do
search_names__icontains=cities_light.models.to_ascii(some_value).
- Run: ./manage.py cities_light --noinsert to update data, set
search_names, alternate_names, region ...
- If filtering cities to import with city_items_pre_import, make a matching
signal reciever for region_items_pre_import new signal. For example::
COUNTRIES = ('FR', 'US', 'BE', 'GB', 'ES', 'PT', 'DE', 'NL')
def filter_city_import(sender, items, **kwargs):
if items[8] not in COUNTRIES:
raise cities_light.InvalidItems()
cities_light.signals.city_items_pre_import.connect(filter_city_import)
def filter_region_import(sender, items, **kwargs):
if items[0].split('.')[0] not in COUNTRIES:
raise cities_light.InvalidItems()
cities_light.signals.region_items_pre_import.connect(filter_region_import)
Also there is now a progress bar in the cities_light command.
Note that the cities_light command now has very performant implementation
of alternateNames parser, which opens possibilities:
- it parses postal codes, but doesn't do anything with them yet
- it parses the name of every country/region/city in any language, used
only for search_names in this version
For 2.0, we aim at:
- including cities_light.contrib.postal_codes,
- including po files with the translation for every country/region/city
name
Contributions are really welcome so please if you need any of these
features don't hesitate to implement and do pull requests !
2012-05-24 1.3+ to 1.5.1
We had to fix migration 0003 for mysql. So to upgrade from 1.3, 1.4, or 1.5
to 1.5.1, do::
./manage.py migrate cities_light 0002
pip install -U django-cities-light
./manage.py migrate cities_light
2012-05-19 1.0 to 1.1
Backward compatibility breaks:
- cities_light.widgets moved to
cities_light.contrib.autocomplete_light_widgets,
- cities_light.lookups moved to
cities_light.contrib.ajax_selects_lookups,
- cities_light.autocomplete_light_registry moved to
cities_light.contrib.autocomplete_light_channels,
- cities_light does not auto-register channels anymore (because you now
have the choice between a basic channel and the remote channel.
New features:
- latitude and longitude fields,
- search_names,
- djangorestframework integration,
- autocomplete_light+djangorestframework integration.
New author:
- Riccardo Magliocchetti