Example #1
0
 def getComments(self):
     """ Return the list of articles """
     begin = self.getBegin()
     end = begin + self.getRange()
     orderBy = self.getOrderBy()
     reverse = self.getReverse()
     comments = list(AlineaComment.select("all", orderBy=AlineaComment.q.date, reversed=reverse)[begin:end])
     return comments
Example #2
0
 def getAllComments(self):
     return list(AlineaComment.select("all", orderBy="id"))
Example #3
0
File: Atom.py Project: philn/alinea
 def getComments(self, orderBy=AlineaComment.q.date):
     " return the last 10 comments "
     comments = list(AlineaComment.select("all", orderBy=orderBy, reversed=True)[0:10])
     return comments
Example #4
0
 def getSize(self):
     query = AlineaComment.select()
     size = query.count()
     return size
Example #5
0
File: RSS2.py Project: philn/alinea
 def getComments(self, orderBy='date'):
     " return the last 10 comments "
     comments = list(AlineaComment.select('all',orderBy=orderBy, reversed=True)[0:10] )
     return comments