def html(self): country_data = [] cd = DeviceCountries.generateGraphData() for c in cd: country = getCountryFromCode(c[0].lower()) country_data.append([c[0].upper(), c[1], country]) self.render({ 'country_data': country_data, })
def json(self): json = simplejson.dumps(DeviceCountries.generateGraphData()) self.response.out.write(json)