Opened 13 years ago
Last modified 10 years ago
#59 closed defect (FIXED)
User feeds
Reported by: | Christopher Allan Webber | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | programming | Keywords: | |
Cc: | Parent Tickets: |
Description
We should make an atom feed so you can subscribe to users' posts. We already have werkzeug as a dependency and it looks like that includes an atom feed generator: `http://flask.pocoo.org/snippets/10/ <http://flask.pocoo.org/snippets/10/>`_ Whomever works on this should: - add the feed - link to the feed on the user profile - add appropriate metadata to the page so the browser indicates there's an available atom feed
Change History (5)
comment:2 by , 13 years ago
So yup, looking good, and those other things you mentioned can come later when our infrastructure better reflects them. :) Overall this looks really good, and I'm glad to see you're identifying clearly the right pieces of a lot of infrastructure (like url\_for\_self and adding mediagoblin\_head block to root.html which we needed). There are a few things though. - Be sure you're conforming to PEP-8. Particularly, see "Whitespace in Expressions and Statements" and make sure you're applying that in the atom\_feed method. `http://www.python.org/dev/peps/pep-0008/ <http://www.python.org/dev/peps/pep-0008/>`_ - The routing copies the 'mediagoblin.user\_pages.user\_home' identifier but you should really make a new one, probably 'mediagoblin.user\_pages.atom\_feed' - Use that with request.urlgen to generate the route in user.html that points to the atom feed - ATOM\_DEFAULT\_NR\_OF\_UPDATED\_ITEMS looks like a global variable, so put it outside of the function definition (right before function is fine) - Looks like there's some inconsistent spacing here (2 spaces instead of 4) :: for entry in cursor: feed.add(entry.get('title'), entry.get('description'), content_type='html', author=request.matchdict['user'], updated=entry.get('created'), url= entry.url_for_self(request.urlgen) ) - We don't have any official styling information about it yet but I prefer {{ foo }} over {{foo}} where possible in templates. Your work is appreciated! Take care of that and I'll merge!
comment:3 by , 13 years ago
[https://gitorious.org/\ :sub:`hunabku/mediagoblin/hunabkus-mediagoblin/commits/feature\_atomfeed](https://gitorious.org/`\ hunabku/mediagoblin/hunabkus-mediagoblin/commits/feature\_atomfeed) reviewed version mentioned points above should be fixed now
Note:
See TracTickets
for help on using tickets.