示例#1
0
文件: models.py 项目: qqiao/magpie
 def read_count(self):
   """Returns the number times this thread has been read.
   
   Returns:
     The number of times this thread has been read.
   """
   return counter.get_count('THREAD_READS:'+str(self.key().id()))
示例#2
0
文件: models.py 项目: qqiao/magpie
 def reply_count(self):
   """Returns the number of replies this thread has.
   
   Return:
     The number of replies this thread has.
   """
   return counter.get_count('THREAD_REPLIES:'+str(self.key().id()))
示例#3
0
文件: models.py 项目: qqiao/magpie
 def post_count(self):
   """Returns the number of posts of this forum.
   
   Returns:
     The number of posts of this forum.
   """
   return counter.get_count('POST_COUNT:'+self.key().id())