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.
This commit is contained in:
@@ -539,13 +539,15 @@ def collection_atom_feed(request):
|
|||||||
'href': push_url})
|
'href': push_url})
|
||||||
|
|
||||||
feed = AtomFeed(
|
feed = AtomFeed(
|
||||||
"MediaGoblin: Feed for %s's collection %s" % (request.matchdict['user'], collection.title),
|
"MediaGoblin: Feed for %s's collection %s" %
|
||||||
|
(request.matchdict['user'], collection.title),
|
||||||
feed_url=request.url,
|
feed_url=request.url,
|
||||||
id='tag:{host},{year}:collection.user-{user}.title-{title}'.format(
|
id=u'tag:{user}@{host},{year}:collection.slug-{slug}'\
|
||||||
|
.format(
|
||||||
host=request.host,
|
host=request.host,
|
||||||
year=datetime.datetime.today().strftime('%Y'),
|
year=collection.created.strftime('%Y'),
|
||||||
user=request.matchdict['user'],
|
user=request.matchdict['user'],
|
||||||
title=collection.title),
|
slug=collection.slug),
|
||||||
links=atomlinks)
|
links=atomlinks)
|
||||||
|
|
||||||
for item in cursor:
|
for item in cursor:
|
||||||
|
|||||||
Reference in New Issue
Block a user