From 1731ade03731e12e4cc94b96f1e871991f8ba958 Mon Sep 17 00:00:00 2001 From: sanj Date: Tue, 3 Aug 2010 03:36:25 +0530 Subject: [PATCH] added robots.txt --- itf/templates/robots.txt | 4 ++++ itf/urls.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 itf/templates/robots.txt diff --git a/itf/templates/robots.txt b/itf/templates/robots.txt new file mode 100644 index 0000000..1feb9f7 --- /dev/null +++ b/itf/templates/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: /erang/ +Disallow: /admin/ + diff --git a/itf/urls.py b/itf/urls.py index 7c6da5a..4aa90ca 100644 --- a/itf/urls.py +++ b/itf/urls.py @@ -2,7 +2,7 @@ from django.conf.urls.defaults import * import settings import os from os.path import join - +from django.views.generic.simple import direct_to_template # Uncomment the next two lines to enable the admin: from django.contrib import admin @@ -13,6 +13,9 @@ urlpatterns = patterns('', # Example: # (r'^bhangar/', include('bhangar.foo.urls')), #(r'^search/', include('solango.urls')), + (r'^robots.txt$', direct_to_template({ + 'template': 'robots.txt' + }) (r'^erang/', include('erang_organised.urls')), (r'^itf/$', 'festival.views.home'), (r'^itf/wireframe', 'festival.views.wireframe'),