Example #1
0
 def post(self):
     feed_name = self.request.get("name")
     feed_url = self.request.get("url")
     target_room = self.request.get("room")
     auth_token = self.request.get("token")
     q = RSSFeed.all()
     q = q.filter("url =", feed_url)
     q = q.filter("token =", auth_token)
     q = q.filter("room =", target_room)
     if q.count() == 0:
         feed = RSSFeed(name=feed_name, url=feed_url, room=target_room, token=auth_token)
         feed.put()
     renderIndex(self.response)
Example #2
0
def renderIndex(response):
    context = {"feeds": RSSFeed.all()}
    result = render("index.html.django", context)
    response.out.write(result)
Example #3
0
 def post(self):
     for feed in RSSFeed.all():
         feed.update()
     return