# HG changeset patch # User Brian Neal # Date 1300241618 0 # Node ID 2a03c69792d89d356d1c223033bba02931599960 # Parent 957955279a15226f09166869e92df226c05c65ce For #187; tune forums RSS settings. Set TTL to 1 hour; return 30 forum posts instead of 10; cache feed for 15 minutes instead of an hour. diff -r 957955279a15 -r 2a03c69792d8 gpp/forums/feeds.py --- a/gpp/forums/feeds.py Wed Mar 16 01:49:10 2011 +0000 +++ b/gpp/forums/feeds.py Wed Mar 16 02:13:38 2011 +0000 @@ -12,7 +12,7 @@ class ForumsFeed(Feed): """The Feed class for a specific forum""" - ttl = '720' + ttl = '60' author_name = 'Brian Neal' author_email = 'admin@surfguitar101.com' @@ -59,7 +59,7 @@ topic__forum__in=Forum.objects.public_forums()) else: items = Post.objects.filter(topic__forum__id=obj.id) - return items.order_by('-creation_date').select_related()[:10] + return items.order_by('-creation_date').select_related()[:30] def item_title(self, item): return item.topic.name diff -r 957955279a15 -r 2a03c69792d8 gpp/urls.py --- a/gpp/urls.py Wed Mar 16 01:49:10 2011 +0000 +++ b/gpp/urls.py Wed Mar 16 02:13:38 2011 +0000 @@ -27,11 +27,11 @@ cache_page(LatestNewsFeed(), 6 * 60 * 60), name='feeds-news'), url(r'^feeds/forums/$', - cache_page(ForumsFeed(), 1 * 60 * 60), + cache_page(ForumsFeed(), 15 * 60), {'forum_slug': None}, 'feeds-forum_combined'), url(r'^feeds/forums/(?P[\w\d-]+)/$', - cache_page(ForumsFeed(), 1 * 60 * 60), + cache_page(ForumsFeed(), 15 * 60), name='feeds-forum'), (r'^forums/', include('forums.urls')), (r'^irc/', include('irc.urls')),