Esempio n. 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
Esempio n. 2
0
 def getAllComments(self):
     return list(AlineaComment.select("all", orderBy="id"))
Esempio n. 3
0
File: Atom.py Progetto: 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
Esempio n. 4
0
 def getSize(self):
     query = AlineaComment.select()
     size = query.count()
     return size
Esempio n. 5
0
File: RSS2.py Progetto: 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