def cityindex(cityid): citylist = city.get_sources() #Retrieve city name from id #TEMPORARY BELOW! for i,v in enumerate(citylist): if v.id == cityid: a = i break else: a = -1 cityname = str(citylist[a].name) #TEMPORARY ABOVE! title="City of " + cityname return render_template('cityindex.html', title=title, navlinks=navlinks, city=cityname, cityid=cityid)
def cities(name=None): title="List of cities" citylist=city.get_sources() return render_template('citylist.html', name=name, title=title, navlinks=navlinks, citylist=citylist)