changeset 385:2a03c69792d8

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.
author Brian Neal <bgneal@gmail.com>
date Wed, 16 Mar 2011 02:13:38 +0000
parents 957955279a15
children 9fcd366f22dc
files gpp/forums/feeds.py gpp/urls.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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<forum_slug>[\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')),