Exemplo n.º 1
0
 def get(self):
     rssid = self.request.get("rss")
     c = (
         Contents.all()
         .filter("rss =", RSS.get_by_id(int(rssid)))
         .filter("realContentResult >", 0)
         .filter("realContentResult !=", None)
     )
     self.render("templates/detailLook.html", {"content": c})
Exemplo n.º 2
0
 def get(self):
     cid = self.request.get("content")
     if cid:
         content = Contents.get_by_id(int(cid))
         self.render("templates/look.html", {"content": content, "view": True})
         return
     rssid = self.request.get("rss")
     if rssid:
         c = Contents.all().filter("realContentResult =", 0).filter("rss =", RSS.get_by_id(int(rssid))).fetch(1)
     if not rssid or not c:
         c = Contents.all().filter("realContentResult =", 0).fetch(1)
     if c:
         content = c[0]
         self.render("templates/look.html", {"content": content})
     else:
         self.redirect("/")