Closed Bug 565362 Opened 14 years ago Closed 14 years ago

[k] Atom feeds for threads and posts

Categories

(support.mozilla.org :: Forum, task, P2)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jsocol, Assigned: jgross)

References

()

Details

(Whiteboard: [change setting on prod])

http://docs.djangoproject.com/en/dev/ref/contrib/syndication/

Here I thought this would take more than 5 minutes.

The correct place for the class definitions is
    apps/forums/feeds.py.

The URLs should look like
    /en-US/forums/forum-slug/feed
    /en-US/forums/forum-slug/1234/feed

Those need to get added apps/forums/urls.py.

Comparing with the examples they give, a few minor differences:
 * Use reverse(), not hard-coded URLs for the link attribute.
 * Localize the title and description attributes (probably _lazy()).
 * We could add get_absolute_url() methods to the new models. It's probably a good idea.
 * Use Atom. It's better.

And test it. That's pretty much it.
This is pretty straight forward and will making a great first bug for someone ;)
Whiteboard: josh+
Assignee: nobody → jgross
http://github.com/jsocol/kitsune/commit/bff8ebb8db18c2ea781bb99eba9e0975985cd796
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: josh+
Reopening; on https://support-stage-new.mozilla.com/k/en-US/forums/test-forum/3/feed, the links are constructed with example.com, like so:

http://example.com/k/en-US/forums/test-forum/3?page=9#post-368
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Stephen: does this also affect the forum feeds, eg:

https://support-stage-new.mozilla.com/en-US/forums/test-forum/feed?

(And ftr: you don't need the /k/ for forums anymore.)
(In reply to comment #4)
> Stephen: does this also affect the forum feeds, eg:
> 
> https://support-stage-new.mozilla.com/en-US/forums/test-forum/feed?

Yes, it does
 
> (And ftr: you don't need the /k/ for forums anymore.)

Thanks; copy-and-paste from another bug, I think, or an old URL in my AwesomeBar.
example.com is the default site in the django sites app. Just need to update the database through the admin if you have admin for the sites app enabled.
I changed the default site from example.com to support-stage-new.mozilla.com and the feeds now point to the right place.

Just need to be sure we change this on prod.
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Whiteboard: [change setting on prod]
in-testsuite+: Bug 570552
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.