Esempio n. 1
0
 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()
Esempio n. 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 def get(self):
     stories=Story.all().fetch(1000)
     GTrendCron.doCron(stories)     
     videos=Video.all().fetch(1000)
     YTrendCron.doCron(videos)