コード例 #1
0
ファイル: Comments.py プロジェクト: philn/alinea
 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
コード例 #2
0
ファイル: Comments.py プロジェクト: philn/alinea
 def getAllComments(self):
     return list(AlineaComment.select("all", orderBy="id"))
コード例 #3
0
ファイル: Atom.py プロジェクト: 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
コード例 #4
0
ファイル: Comments.py プロジェクト: philn/alinea
 def getSize(self):
     query = AlineaComment.select()
     size = query.count()
     return size
コード例 #5
0
ファイル: RSS2.py プロジェクト: 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