Render the entry content to HTML when syndicating it as Atom or RSS

This commit is contained in:
Danielle McLean 2017-11-01 09:32:42 +11:00
parent 730a2bcb9d
commit 5555cdfd1e
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -3,6 +3,7 @@ from django.contrib.syndication.views import Feed
from django.urls import reverse
from django.utils.feedgenerator import Atom1Feed
from urllib.parse import urljoin
from lemoncurry.templatetags.markdown import markdown
from .models import Entry
@ -11,7 +12,7 @@ class EntriesFeed(Feed):
return entry.title
def item_description(self, entry):
return entry.content
return markdown(entry.content)
def item_author_name(self, entry):
return entry.author.name