Mercurial > public > sg101
annotate gpp/news/feeds.py @ 11:cc8eb028def1
Update jquery-ui and theme version that is hosted on google. In preparation for having jquery on every page (?), make it so that the autocomplete plug is using the 'global' jquery, and not the one that came with it. It seems to work okay with jquery 1.3.2.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 14 Apr 2009 02:35:35 +0000 (2009-04-14) |
parents | dbd703f7d63a |
children | 6f14970b103a |
rev | line source |
---|---|
gremmie@1 | 1 """ |
gremmie@1 | 2 This file contains the feed classes for the news application. |
gremmie@1 | 3 """ |
gremmie@1 | 4 |
gremmie@1 | 5 from django.contrib.syndication.feeds import Feed |
gremmie@1 | 6 from news.models import Story |
gremmie@1 | 7 |
gremmie@1 | 8 |
gremmie@1 | 9 class LatestNewsFeed(Feed): |
gremmie@1 | 10 """The Feed class for the news application""" |
gremmie@1 | 11 |
gremmie@1 | 12 title = 'SurfGuitar101.com News Feed' |
gremmie@1 | 13 link = '/feeds/news/' |
gremmie@1 | 14 description = 'News articles and stories from SurfGuitar101.com' |
gremmie@1 | 15 copyright = 'Copyright (C) 2008, Brian Neal' |
gremmie@1 | 16 ttl = '720' |
gremmie@1 | 17 |
gremmie@1 | 18 title_template = 'news/feed_title.html' |
gremmie@1 | 19 description_template = 'news/feed_description.html' |
gremmie@1 | 20 |
gremmie@1 | 21 def items(self): |
gremmie@1 | 22 return Story.objects.order_by('-date_published')[:5] |
gremmie@1 | 23 |
gremmie@1 | 24 def item_pubdate(self, item): |
gremmie@1 | 25 return item.date_published |
gremmie@1 | 26 |
gremmie@1 | 27 def item_categories(self, item): |
gremmie@1 | 28 return (item.category.title, ) |