Differences From Artifact [59984e848a]:
- File applications/mobileblur/controllers/stories.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: 239) [annotate] [blame] [check-ins using] [more...]
To Artifact [fbf9de8ba7]:
- File applications/mobileblur/controllers/stories.py — part of check-in [da2e9d5879] at 2011-11-20 23:29:30 on branch develop — Added a button to mark a story as read (user: spiffy, size: 421) [annotate] [blame] [check-ins using] [more...]
1 2 3 4 5 6 7 | # -*- coding: utf-8 -*- from pprint import pprint def view(): stories = newsblur.feed(request.vars["feed_id"])["stories"] story = [story for story in stories if story["id"]==request.vars["story"]][0] | | > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | # -*- coding: utf-8 -*- from pprint import pprint def view(): stories = newsblur.feed(request.vars["feed_id"])["stories"] story = [story for story in stories if story["id"]==request.vars["story"]][0] return dict(story=story, feed_id=request.vars["feed_id"]) def mark_read(): results = newsblur.mark_story_as_read(request.vars["story_id"], request.vars["feed_id"]) redirect(URL("default", "index")) |