Created
July 15, 2015 08:47
-
-
Save svfat/c3ca5169f838b3fd9b72 to your computer and use it in GitHub Desktop.
django robots.txt in urls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.http import HttpResponse | |
urlpatterns += url(r'^robots.txt$', lambda r: HttpResponse("User-agent: *\nDisallow: /", content_type="text/plain")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment