Skip to content

Commit

Permalink
Merge branch 'feature/review-feed-author-url' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Fantomas42 committed Mar 21, 2014
2 parents 3a465fd + ec3fd17 commit 24edfc0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions zinnia/feeds.py
Expand Up @@ -103,18 +103,17 @@ def item_author_name(self, item):
def item_author_email(self, item):
"""
Return the first author's email.
Should not be called if self.item_author_name has returned None.
"""
return self.item_author.email

def item_author_link(self, item):
"""
Return the author's URL.
Should not be called if self.item_author_name has returned None.
"""
try:
author_url = reverse(
'zinnia:author_detail',
args=[getattr(self.item_author,
self.item_author.USERNAME_FIELD)])
author_url = self.item_author.get_absolute_url()
return self.site_url + author_url
except NoReverseMatch:
return self.site_url
Expand Down Expand Up @@ -241,8 +240,7 @@ def link(self, obj):
"""
URL of the author.
"""
return reverse('zinnia:author_detail',
args=[getattr(obj, obj.USERNAME_FIELD)])
return obj.get_absolute_url()

def get_title(self, obj):
"""
Expand Down

0 comments on commit 24edfc0

Please sign in to comment.