예제 #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
 def get(self):
     stories=[]
     for s in Story.all().order('-timestamp').fetch(100):
         stories.append(s)
     
     template_values = {
                        "stories":stories
                        }
     path = os.path.join(os.path.dirname(__file__), '../html/article.html')
     shared.render(self, path, template_values)
예제 #3
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)
예제 #4
0
 def get(self):
     stories=Story.all().fetch(1000)
     GTrendCron.doCron(stories)     
     videos=Video.all().fetch(1000)
     YTrendCron.doCron(videos)