forked from 0x2620/pandora
city values are unicode in django 1.4
This commit is contained in:
parent
d6dbf4c344
commit
a0d337e6d8
1 changed files with 3 additions and 1 deletions
|
@ -65,7 +65,9 @@ class SessionData(models.Model):
|
|||
if location:
|
||||
country = ox.get_country_name(location['country_code'])
|
||||
if location['city']:
|
||||
city = location['city'].decode('latin-1')
|
||||
city = location['city']
|
||||
if type(city) != unicode:
|
||||
city = city.decode('latin-1')
|
||||
self.location = u'%s, %s' % (city, country)
|
||||
self.location_sort = u'%s, %s' % (country, city)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue