コード例 #1
0
ファイル: user.py プロジェクト: abyx/codeduel
 def _get_all_users(self):
     all_snips = Snippet.all()
     return dict((str(s.submitter.user_id()), s.submitter) for s in all_snips if s.submitter is not None)
コード例 #2
0
ファイル: user.py プロジェクト: abyx/codeduel
 def _get_snippets_for_id(self, user_id):
     all_snips = Snippet.all()
     return [s for s in all_snips if s.submitter is not None and s.submitter.user_id() == user_id]
コード例 #3
0
ファイル: top.py プロジェクト: abyx/codeduel
 def _get_sorted_snippets(self):
     query = Snippet.all().order("-rank")
     return query.fetch(limit = LIMIT_TOP_RANKS)