I've implemented a very quick "announcement" feed as coded below.  
This meets my current need of adding news items in the admin and  
having an Atom feed for them (there are also HTML views but that's  
irrelevant to my question).

However, I'd like my feed to be full content. Given what I have  
below, what's the most straightforward way to make my feed full content?

I'm assuming I'm going to have to write a template for full-content  
Atom entries, but I'm not sure how to get  
django.contrib.syndication.views.feed to work with that. Currently,  
django.contrib.syndication.views.feed just uses a feedgenerator,  
right. Not a template?

James


urls.py has:

     (r"^feeds/(.*)\.atom$", "django.contrib.syndication.views.feed", {
         "feed_dict" : {
             "announcements": LatestAnnouncements,
         }
     }),

where LatestAnnouncements is:

class LatestAnnouncements(Feed):

     feed_type = Atom1Feed

     title = "Quisition Announcements"
     link = "/announcements/"
     description = "Updates on changes and additions to Quisition.com"

     def items(self):
         return NewsItem.objects.order_by("-creation_date")[:10]

and NewsItem is:

class NewsItem(models.Model):

     title = models.CharField(maxlength=50)
     content = models.TextField()
     creator = models.ForeignKey(User)
     creation_date = models.DateTimeField(auto_now_add=True)

     def get_absolute_url(self):
         return "/announcements/" + str(self.id)

     def __str__(self):
         return self.title

     class Admin:
         list_display = ("title", "creator", "creation_date")


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to