This repository was archived by the owner on Sep 19, 2018. It is now read-only.
File tree 3 files changed +7
-4
lines changed
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 489
489
u'ZA' : None ,
490
490
u'ZM' : None ,
491
491
u'ZW' : None ,
492
+ u'XK' : 'Kosovo' ,
492
493
}
493
494
########## END ATHENTICATION CONFIGURATION
494
495
Original file line number Diff line number Diff line change @@ -75,10 +75,12 @@ var Codeweek = window.Codeweek || {};
75
75
function updateAddress ( new_latLng ) {
76
76
geocoder = new google . maps . Geocoder ( ) ;
77
77
geocoder . geocode ( { 'latLng' : new_latLng } , function ( results , status ) {
78
- if ( status === google . maps . GeocoderStatus . OK ) {
78
+ if ( status === google . maps . GeocoderStatus . OK ||
79
+ ( status === google . maps . GeocoderStatus . ZERO_RESULTS && results . length > 0 ) ) {
79
80
document . getElementById ( "autocomplete" ) . value = results [ 0 ] . formatted_address ;
80
81
// the last item in the geocoder for latLng results array is the country
81
- var country = results [ results . length - 1 ] . address_components [ 0 ] . short_name
82
+ var country = results . slice ( - 1 ) [ 0 ] . address_components . slice ( - 1 ) [ 0 ] . short_name ;
83
+
82
84
updateCountrySelection ( country ) ;
83
85
}
84
86
} ) ;
Original file line number Diff line number Diff line change @@ -161,8 +161,8 @@ class SearchEventForm(forms.Form):
161
161
162
162
# XK is temp code for Kosovo; remove from COUNTRIES_OVERRIDE when
163
163
# Kosovo gets its own ISO code and is added to django-countries
164
- # if not 'Kosovo' in list(dict(countries._countries).values()):
165
- # countries._countries.append((u'XK', u'Kosovo'))
164
+ if not 'Kosovo' in list (dict (countries ._countries ).values ()):
165
+ countries ._countries .append ((u'XK' , u'Kosovo' ))
166
166
167
167
search = forms .CharField (
168
168
required = False ,
You can’t perform that action at this time.
0 commit comments