Skip to content

Commit

Permalink
Block /en/ and /cs/ in robots.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Jan 3, 2016
1 parent e6de224 commit cbf4c33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions anatomy/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
}
),
url(r'^$', 'anatomy.views.home', name='home'),
url(r'^(about|home|overview|view/\w*|u/\w+|practice/\w*/?\w*|refreshpractice/\w*/?\w*)',
url(r'^(about|home|overview|view/\w*|u/\w*|practice/\w*/?\w*|refreshpractice/\w*/?\w*)',
'anatomy.views.home', name='home'),
url(r'^favicon\.ico$', RedirectView.as_view(url='static/img/favicon.png')),
url(r'^robots.txt$', lambda r: HttpResponse(
"User-agent: *\nDisallow: ", content_type="text/plain")),
"User-agent: *\n" +
"\n".join(["Disallow: /%s/" % l[0] for l in settings.LANGUAGES]),
content_type="text/plain")),
url(r'^load_flashcards/', 'anatomy.views.load_flashcards', name='load_flashcards'),

url(r'^user/', include('proso_user.urls')),
Expand Down

0 comments on commit cbf4c33

Please sign in to comment.