Differences From Artifact [61898c0aad]:
- File applications/mobileblur/controllers/feeds.py — part of check-in [cbc0649388] at 2011-11-20 03:03:33 on branch develop — Moved newsblur library from urllib to Requests. Moved username storage to the DB. Store cookie in the DB. Centralize a login function that checks the DB for a user's cookie on each page load and logs the user in if there's no cookie. (user: spiffy, size: 299) [annotate] [blame] [check-ins using]
To Artifact [b47f0eada4]:
- File applications/mobileblur/controllers/feeds.py — part of check-in [b74e6c434b] at 2011-11-20 03:12:48 on branch develop — Added a button to mark a feed as read (user: spiffy, size: 408) [annotate] [blame] [check-ins using] [more...]
1 2 3 4 5 6 7 8 9 | # -*- coding: utf-8 -*- from pprint import pprint def view(): stories = newsblur.feed(request.args[0])["stories"] feeds = newsblur.feeds(flat=True)["feeds"] feed = [feed for feed in feeds.itervalues() if feed["id"]==int(request.args[0])][0] return dict(stories=stories, feed=feed) | > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 | # -*- coding: utf-8 -*- from pprint import pprint def view(): stories = newsblur.feed(request.args[0])["stories"] feeds = newsblur.feeds(flat=True)["feeds"] feed = [feed for feed in feeds.itervalues() if feed["id"]==int(request.args[0])][0] return dict(stories=stories, feed=feed) def mark_read(): newsblur.mark_feed_as_read(request.vars["feed"]) redirect(URL("default", "index")) |