Пример #1
0
 def post(self):
     self._write_error(410)
     return
     subscription_id = self.request.get('subscription_id')
     subscription = data.get_subscription_by_id(subscription_id)
     subscription.advance()
     self.response.out.write('OK')
Пример #2
0
 def post(self):
     self._write_error(410)
     return
     subscription_id = self.request.get('subscription_id')
     subscription = data.get_subscription_by_id(subscription_id)
     subscription.advance()
     self.redirect('/feed-playback/subscription/%s' % subscription_id)
Пример #3
0
    def get(self, subscription_id):
        subscription = data.get_subscription_by_id(subscription_id)

        if not subscription:
            self._write_not_found()
            return

        feed_info = data.get_feed_info_from_feed_url(subscription.feed_url)

        self._write_template('feedplayback/subscription.html', {
            'feed_title': feed_info.title,
            'feed_url': subscription.feed_url,
            'subscription_id': subscription_id,
            'subscription_feed_url': subscription.get_subscription_feed_url(),
            'subscription_reader_url': subscription.get_subscription_reader_url(),
            'position': subscription.position + 1,
            'item_count': len(feed_info.item_ids),
            'frequency': _FREQUENCY_DISPLAY_NAMES[subscription.frequency]
        })