Artifact 59984e848aac338b19593c7b4da126aa76659d7f:
- 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...]
# -*- 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)