diff options
author | Joar Wandborg <joar@wandborg.se> | 2013-02-02 23:25:04 +0100 |
---|---|---|
committer | Joar Wandborg <joar@wandborg.se> | 2013-02-13 22:23:27 +0100 |
commit | 19ad2e0cd0ff2e03cdf1243a9cedaecd4a187592 (patch) | |
tree | 5ca01337701f971a7584c435fe3e5d5c21aaeda3 /mediagoblin/user_pages/views.py | |
parent | b4ea20fa98d2ef9a25be6b964e2b9509c32d60d0 (diff) | |
download | mediagoblin-19ad2e0cd0ff2e03cdf1243a9cedaecd4a187592.tar.lz mediagoblin-19ad2e0cd0ff2e03cdf1243a9cedaecd4a187592.tar.xz mediagoblin-19ad2e0cd0ff2e03cdf1243a9cedaecd4a187592.zip |
Address concerns in Issue #543
- Fixed PEP-008 issues.
- Removed .user-{user} from the tag URI and put it before the domain,
such as {user}@{host} instead.
- Use year from collection.created instead of current year.
Diffstat (limited to 'mediagoblin/user_pages/views.py')
-rw-r--r-- | mediagoblin/user_pages/views.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py index dea47fbf..8602c583 100644 --- a/mediagoblin/user_pages/views.py +++ b/mediagoblin/user_pages/views.py @@ -539,14 +539,16 @@ def collection_atom_feed(request): 'href': push_url}) feed = AtomFeed( - "MediaGoblin: Feed for %s's collection %s" % (request.matchdict['user'], collection.title), - feed_url=request.url, - id='tag:{host},{year}:collection.user-{user}.title-{title}'.format( - host=request.host, - year=datetime.datetime.today().strftime('%Y'), - user=request.matchdict['user'], - title=collection.title), - links=atomlinks) + "MediaGoblin: Feed for %s's collection %s" % + (request.matchdict['user'], collection.title), + feed_url=request.url, + id=u'tag:{user}@{host},{year}:collection.slug-{slug}'\ + .format( + host=request.host, + year=collection.created.strftime('%Y'), + user=request.matchdict['user'], + slug=collection.slug), + links=atomlinks) for item in cursor: entry = item.get_media_entry |