From d9c06ef57483596ab196db15598a1fc487963815 Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 16 Jul 2010 20:17:40 +0000 Subject: [PATCH] fixes OSQA-390 by adding a default sitemap.xml to the robots file. This might not work completely with sub-directories, but there's a whole slew of issues to fix around that anyway. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@543 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum_modules/robotstxt/settings.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/forum_modules/robotstxt/settings.py b/forum_modules/robotstxt/settings.py index c2620a2..44d576a 100644 --- a/forum_modules/robotstxt/settings.py +++ b/forum_modules/robotstxt/settings.py @@ -1,10 +1,13 @@ from forum.settings.base import Setting, SettingSet from django.forms.widgets import Textarea +from django.core.urlresolvers import reverse +from forum.settings import APP_URL ROBOTS_SET = SettingSet('robots', 'Robots txt', "Set up the robots.txt file.", 3000) ROBOTS_FILE = Setting('ROBOTS_FILE', -""" +"""Sitemap: %s/sitemap.xml + User-Agent: * Disallow: /accounts/ Disallow: /users/ @@ -12,7 +15,7 @@ Disallow: /revisions/ Disallow: /search Disallow: /matching_tags Disallow: /*sort= -""", ROBOTS_SET, dict( +""" % APP_URL, ROBOTS_SET, dict( label = "Robots.txt file", help_text = """ The robots.txt file search engine spiders will see. -- 2.39.5