forked from yourlabs/django-cities-light
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGELOG
149 lines (97 loc) · 4.78 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
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 Piet 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