def site_page(code): # Find a site that matches this code site = Site(code) # Load weather data for this site. Data is not preloaded to avoid # downloading entire batch of Environment Canada data on first run. template = jinja_env.get_template("site.html") return template.render( site = site, home = home(), timetext = site.load_weather()[2], )