Permalink
Browse files

warning for users in RSS feeds on dev

  • Loading branch information...
1 parent f49bb2e commit 05e068dc4a479feda3ad8d775b20490a3b897978 @ryanpitts ryanpitts committed Mar 7, 2013
Showing with 13 additions and 2 deletions.
  1. +13 −2 source/base/feeds.py
View
@@ -1,3 +1,4 @@
+from django.conf import settings
from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
from django.db.models import Q
@@ -53,7 +54,12 @@ def description(self, obj):
return "Recent articles %s" % identifier
def item_title(self, item):
- return item.title
+ _title = item.title
+ # Alert anyone using an RSS feed on staging
+ if settings.DEBUG:
+ _title = "THIS IS A TEST ARTICLE ON THE STAGING SITE: " + _title
+
+ return _title
def item_pubdate(self, item):
return item.pubdate
@@ -97,7 +103,12 @@ def description(self, obj):
return "Recent code index pages%s" % identifier
def item_title(self, item):
- return item.name
+ _name = item.name
+ # Alert anyone using an RSS feed on staging
+ if settings.DEBUG:
+ _name = "THIS IS A TEST ENTRY ON THE STAGING SITE: " + _name
+
+ return _name
def item_description(self, item):
return item.description

0 comments on commit 05e068d

Please sign in to comment.