Index: applications/mobileblur/controllers/default.py ================================================================== --- applications/mobileblur/controllers/default.py +++ applications/mobileblur/controllers/default.py @@ -21,11 +21,10 @@ if login_form.accepts(request): try: results = newsblur.login(login_form.vars["username"], login_form.vars["password"]) response.cookies["nb_cookie"] = newsblur.cookies["newsblur_sessionid"] response.cookies["nb_cookie"]["path"] = "/" - print "cookie =", newsblur.cookies redirect(URL("index")) except Exception as ex: login_form.insert(-1, ex.message) return dict(login_form=login_form) Index: applications/mobileblur/controllers/feeds.py ================================================================== --- applications/mobileblur/controllers/feeds.py +++ applications/mobileblur/controllers/feeds.py @@ -7,7 +7,8 @@ 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"]) + if len(request.args) > 0: + newsblur.mark_feed_as_read(request.args[0]) redirect(URL("default", "index")) Index: applications/mobileblur/controllers/stories.py ================================================================== --- applications/mobileblur/controllers/stories.py +++ applications/mobileblur/controllers/stories.py @@ -3,6 +3,10 @@ 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) + 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")) Index: applications/mobileblur/modules/newsblur.py ================================================================== --- applications/mobileblur/modules/newsblur.py +++ applications/mobileblur/modules/newsblur.py @@ -21,12 +21,10 @@ Required parameters, username and password, must be of string type. ''' url = nb_url + 'api/login' results = requests.post(url, data={"username": username, "password": password}) - print "results.cookies =", results.cookies - print type(results.cookies) self.cookies = results.cookies results = simplejson.loads(results.content) if results["authenticated"] is False: raise Exception("The newsblur credentials you provided are invalid") return results Index: applications/mobileblur/views/feeds/view.html ================================================================== --- applications/mobileblur/views/feeds/view.html +++ applications/mobileblur/views/feeds/view.html @@ -1,10 +1,10 @@ {{left_sidebar_enabled=right_sidebar_enabled=False}} {{extend 'layout.html'}}

{{= feed["feed_title"] }}

- Mark feed as read + Mark feed as read {{ for story in stories: }}

{{= story["story_title"] }}

{{ pass }} Index: applications/mobileblur/views/stories/view.html ================================================================== --- applications/mobileblur/views/stories/view.html +++ applications/mobileblur/views/stories/view.html @@ -1,9 +1,10 @@ {{left_sidebar_enabled=right_sidebar_enabled=False}} {{extend 'layout.html'}}

{{= story["story_title"] }}

+Mark story as read {{= XML(story["story_content"]) }} {{block left_sidebar}}New Left Sidebar Content{{end}} {{block right_sidebar}}New Right Sidebar Content{{end}}