Add robots "noindex, nofollow" to deleted and banned post pages.

This commit is contained in:
Max Goodman
2011-11-28 09:29:29 -08:00
parent 7ac293d3d6
commit 50c51c223d

View File

@@ -847,7 +847,8 @@ class LinkInfoPage(Reddit):
else:
self.duplicates = duplicates
Reddit.__init__(self, title = title, short_description=short_description, *a, **kw)
robots = "noindex,nofollow" if link._deleted or link._spam else None
Reddit.__init__(self, title = title, short_description=short_description, robots=robots, *a, **kw)
def build_toolbars(self):
base_path = "/%s/%s/" % (self.link._id36, title_to_url(self.link.title))