from __future__ import absolute_import

from django.contrib.syndication.views import Feed
from .models import Entry

class WeblogEntryFeed(Feed):
    title = "The Django weblog"
    link = "http://www.djangoproject.com/weblog/"
    description = "Latest news about Django, the Python Web framework."

    def items(self):
        return Entry.objects.published()[:10]

    def item_pubdate(self, item):
        return item.pub_date

from __future__ import absolute_import

from django.contrib.syndication.views import Feed
from .models import Entry

class WeblogEntryFeed(Feed):
    title = "The Django weblog"
    link = "http://www.djangoproject.com/weblog/"
    description = "Latest news about Django, the Python Web framework."

    def items(self):
        return Entry.objects.published()[:10]

    def item_pubdate(self, item):
        return item.pub_date

    def item_author_name(self, item):
        return item.author

    def item_description(self, item):
        return item.body_html

Add author name and body to the weblog RSS feed.
Add author name and body to the weblog RSS feed.

  from __future__ import absolute_import
  
  from django.contrib.syndication.views import Feed
  from .models import Entry
  
  class WeblogEntryFeed(Feed):
      title = "The Django weblog"
      link = "http://www.djangoproject.com/weblog/"
      description = "Latest news about Django, the Python Web framework."
  
      def items(self):
          return Entry.objects.published()[:10]
  
      def item_pubdate(self, item):
          return item.pub_date
  
+     def item_author_name(self, item):
+         return item.author
+ 
+     def item_description(self, item):
+         return item.body_html
+ 
Add author name and body to the weblog RSS feed.
## Code Before:
from __future__ import absolute_import

from django.contrib.syndication.views import Feed
from .models import Entry

class WeblogEntryFeed(Feed):
    title = "The Django weblog"
    link = "http://www.djangoproject.com/weblog/"
    description = "Latest news about Django, the Python Web framework."

    def items(self):
        return Entry.objects.published()[:10]

    def item_pubdate(self, item):
        return item.pub_date

## Instruction:
Add author name and body to the weblog RSS feed.
## Code After:
from __future__ import absolute_import

from django.contrib.syndication.views import Feed
from .models import Entry

class WeblogEntryFeed(Feed):
    title = "The Django weblog"
    link = "http://www.djangoproject.com/weblog/"
    description = "Latest news about Django, the Python Web framework."

    def items(self):
        return Entry.objects.published()[:10]

    def item_pubdate(self, item):
        return item.pub_date

    def item_author_name(self, item):
        return item.author

    def item_description(self, item):
        return item.body_html
