[PATCH] Statically serve robots.txt
martin f. krafft
madduck at madduck.net
Tue Feb 2 17:02:23 EST 2010
If a request for /robots.txt makes it through to Django, serve it
statically from htdocs.
Signed-off-by: martin f. krafft <madduck at madduck.net>
---
apps/urls.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/apps/urls.py b/apps/urls.py
index 85bd8c6..bf823bf 100644
--- a/apps/urls.py
+++ b/apps/urls.py
@@ -47,5 +47,7 @@ urlpatterns = patterns('',
{'document_root': '/srv/patchwork/htdocs/js'}),
(r'^images/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': '/srv/patchwork/htdocs/images'}),
+ (r'^robots\.txt$', 'django.views.static.serve',
+ {'document_root': '/srv/patchwork/htdocs',
+ 'path': 'robots.txt'}),
)
-
--
1.5.6.5
More information about the Patchwork
mailing list