mirror of https://gitlab.com/bashrc2/epicyon
Generating cities dropdown when no city file exists
parent
3136f428d3
commit
8b5093eef4
|
@ -1485,6 +1485,7 @@ def _htmlEditProfileFiltering(baseDir: str, nickname: str, domain: str,
|
||||||
translate['City for spoofed GPS image metadata'] + \
|
translate['City for spoofed GPS image metadata'] + \
|
||||||
'</label><br>\n'
|
'</label><br>\n'
|
||||||
|
|
||||||
|
city = ''
|
||||||
cityFilename = acctDir(baseDir, nickname, domain) + '/city.txt'
|
cityFilename = acctDir(baseDir, nickname, domain) + '/city.txt'
|
||||||
if os.path.isfile(cityFilename):
|
if os.path.isfile(cityFilename):
|
||||||
with open(cityFilename, 'r') as fp:
|
with open(cityFilename, 'r') as fp:
|
||||||
|
@ -1505,6 +1506,7 @@ def _htmlEditProfileFiltering(baseDir: str, nickname: str, domain: str,
|
||||||
citySelected = ''
|
citySelected = ''
|
||||||
cityName = cityName.split(':')[0]
|
cityName = cityName.split(':')[0]
|
||||||
cityName = cityName.lower()
|
cityName = cityName.lower()
|
||||||
|
if city:
|
||||||
if city in cityName:
|
if city in cityName:
|
||||||
citySelected = ' selected'
|
citySelected = ' selected'
|
||||||
editProfileForm += \
|
editProfileForm += \
|
||||||
|
|
Loading…
Reference in New Issue