Example #1
0
    def post(self, *args, **kwargs):
        feedurl = self.request.get("url")
        feedparam = parsefeed(feedurl)
        self.response.write(feedurl)

        feed = NdbFeed(title=feedparam['title'],
                       url=feedparam['url'],
                       upday=feedparam['upday'])
        feed.key = feed.gen_key(feedparam['key_name'])
        feed_key = feed.put()
        logging.info(feed_key)
        return webapp2.redirect(webapp2.uri_for('list-blogs'))
Example #2
0
    def post(self, *args, **kwargs):
        feedurl = self.request.get("url")
        feedparam = parsefeed(feedurl)
        self.response.write(feedurl)

        feed = NdbFeed(title=feedparam['title'],
                       url=feedparam['url'],
                       upday=feedparam['upday'])
        feed.key = feed.gen_key(feedparam['key_name'])
        feed_key = feed.put()
        logging.info(feed_key)
        return webapp2.redirect(webapp2.uri_for('list-blogs'))
Example #3
0
 def get(self, *args, **kwargs):
     # RSSフィード一覧取得
     urlLogout = users.create_logout_url('/')
     urlStoreFeed = webapp2.uri_for('store-feed')
     urlListBlogs = webapp2.uri_for('list-blogs')
     # logging.info(super(DefaultHandler, self).get_module_name())
     feed_key = NdbFeed.get_ancestor()
     feeds = NdbFeed.query_feed(feed_key)
     template_values = {
         'feeds': feeds,
         'urlLogout': urlLogout,
         'urlStoreFeed': urlStoreFeed,
         'urlListBlogs': urlListBlogs,
     }
     template = self.JINJA_ENVIRONMENT.get_template('blogs.html')
     self.response.write(template.render(template_values))
Example #4
0
 def get(self, *args, **kwargs):
     # RSSフィード一覧取得
     urlLogout = users.create_logout_url('/')
     urlStoreFeed = webapp2.uri_for('store-feed');
     urlListBlogs = webapp2.uri_for('list-blogs');
     # logging.info(super(DefaultHandler, self).get_module_name())
     feed_key = NdbFeed.get_ancestor()
     feeds = NdbFeed.query_feed(feed_key)
     template_values = {
         'feeds': feeds,
         'urlLogout': urlLogout,
         'urlStoreFeed': urlStoreFeed,
         'urlListBlogs': urlListBlogs,
     }
     template = self.JINJA_ENVIRONMENT.get_template('blogs.html')
     self.response.write(template.render(template_values))