def summarize_field(field): missed_connections = [db.to_dict(m) for m in Mis.all()] values = [p[field] for p in missed_connections] valuecounts = dict((i,values.count(i)) for i in set(values) if i) return sorted(valuecounts.iteritems(), key=operator.itemgetter(1), reverse=True)
def get(self): misses = Mis.all().order('-posted').fetch(50) self.response.out.write(template.render('templates/index.html',{'misses':misses}))