コード例 #1
0
ファイル: purge.py プロジェクト: joeykblack/Appspot
 def get(self):
     stories=Story.all().order('-timestamp').fetch(1000, offset=0)
     for story in stories:
         story.delete()
     videos=Video.all().order('-timestamp').fetch(1000, offset=0)
     for video in videos:
         video.delete()
コード例 #2
0
ファイル: index.py プロジェクト: joeykblack/Appspot
 def get(self):
     stories=[]
     for s in Story.all().order('-timestamp').fetch(100):
         stories.append(s)
     videos=[]
     for v in Video.all().order('-timestamp').fetch(100):
         videos.append(v)
     
     template_values = {
                        "stories":stories,
                        "videos":videos
                        }
     path = os.path.join(os.path.dirname(__file__), '../html/index.html')
     shared.render(self, path, template_values)
コード例 #3
0
ファイル: stories.py プロジェクト: joeykblack/Appspot
 def get(self):
     stories=Story.all().fetch(1000)
     GTrendCron.doCron(stories)     
     videos=Video.all().fetch(1000)
     YTrendCron.doCron(videos)