1👍
✅
You are trying to access robot.txt
instead of robots.txt
.
You should access http://localhost/127.0.0.1:8000/robots.txt
0👍
by the way it should be in urls.py not in views.py.
like this:
from django.http import HttpResponse
urlpatterns = patterns('',
...
(r'^robots\.txt$', lambda r: HttpResponse("User-agent: *\nDisallow: /", mimetype="text/plain"))
)
- [Answer]-Patches and updates
- [Answer]-Success variable message is assigned referenced before assignment
- [Answer]-Sending array to django via ajax
Source:stackexchange.com