comparison link.py @ 21:8008ec2fd763

fix up link page reloading. tried davisjs; may not need it Ignore-this: d0021609f019f0734e779a61e3e73b62
author Drew Perttula <drewp@bigasterisk.com>
date Thu, 11 Jul 2013 00:45:55 -0700
parents d44d3e4d415b
children d6a09e8efa56
comparison
equal deleted inserted replaced
20:a8887fb93676 21:8008ec2fd763
30 raise NotFound("not found") 30 raise NotFound("not found")
31 elif len(docs) > 1: 31 elif len(docs) > 1:
32 raise ValueError("%s docs found for href %s" % (len(docs), uri)) 32 raise ValueError("%s docs found for href %s" % (len(docs), uri))
33 else: 33 else:
34 return docs[0] 34 return docs[0]
35
36 def filter(self, user, startTime):
37 return self.coll.find({'user' : user, 't': {'$gte': startTime}})
35 38
36 def forDisplay(self, doc): 39 def forDisplay(self, doc):
37 """return a mustache-ready dict for this db doc""" 40 """return a mustache-ready dict for this db doc"""
38 out = doc.copy() 41 out = doc.copy()
39 del out['_id'] 42 del out['_id']