Esempio n. 1
0
    def get(self):
        s = Source.all().order("modified").fetch(limit=100)

        user = users.get_current_user()
        if user:
            url = users.create_logout_url("/")
        else:
            url = None

        sources_list = split_list(s, 3)

        template_values = {"a": sources_list[0], "b": sources_list[1], "c": sources_list[2], "url": url}
        path = os.path.join(os.path.dirname(__file__), "templates/index.html")
        self.response.out.write(template.render(path, template_values))
Esempio n. 2
0
 def get(self):
     sources = Source.all()
     items = Item.all()
     json = simplejson.dumps({"sources": [s.to_dict() for s in sources], "items": [i.to_dict() for i in items]})
     self.response.out.write(json)
Esempio n. 3
0
 def get(self):
     sources = Source.all()
     for source in sources:
         taskqueue.add(url="/sources/refresh", params={"key": source.key()})
Esempio n. 4
0
 def get(self):
     sources = Source.all()
     template_values = {"sources": sources}
     path = os.path.join(os.path.dirname(__file__), "templates/sources.html")
     self.response.out.write(template.render(path, template_values))