Skip to content
Browse files

default # of events to fetch via rss is now a setting

  • Loading branch information...
1 parent 1ea35de commit ea263d750b1cd1afb3ae35351095f0e79e91cf0c Charlie Hsu committed Jul 24, 2012
Showing with 5 additions and 2 deletions.
  1. +2 −2 stashboard/handlers/site.py
  2. +3 −0 stashboard/settings.py
View
4 stashboard/handlers/site.py
@@ -361,7 +361,7 @@ def get(self):
self.redirect("/admin/credentials")
class RSSHandler(BaseHandler):
- """ Feed of the last 100 events """
+ """ Feed of the last settings.RSS_NUM_EVENTS_TO_FETCH events """
def get(self):
self.response.headers['Content-Type'] = "text/xml"
@@ -371,7 +371,7 @@ def get(self):
events = []
query = Event.all().order("-start")
- for event in query.fetch(100):
+ for event in query.fetch(settings.RSS_NUM_EVENTS_TO_FETCH):
event.link = base_url + '/services/' + event.service.slug
event.title = '[%s - %s] %s' % (event.service.name, event.status.name, event.message)
events.append(event)
View
3 stashboard/settings.py
@@ -7,6 +7,9 @@
SITE_URL = "http://stashbooard.appspot.com"
REPORT_URL = "mailto:help@stashboard.org"
+# RSS Feed settings
+RSS_NUM_EVENTS_TO_FETCH = 50
+
# OAuth Consumer Credentials
CONSUMER_KEY = 'anonymous'
CONSUMER_SECRET = 'anonymous'

0 comments on commit ea263d7

Please sign in to comment.
Something went wrong with that request. Please try again.