示例#1
0
文件: main.py 项目: awans/mis
 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)
示例#2
0
文件: main.py 项目: awans/mis
 def get(self):
   misses = Mis.all().order('-posted').fetch(50)
   self.response.out.write(template.render('templates/index.html',{'misses':misses}))