(ページの作成:「== やりたいこと == * http://example.com/robots.txt アクセスに対してrobos.txtを正しく返す。 == 手順 == === app_dir/urls.py ===  from django.vie...」)
(相違点なし)

2016年4月21日 (木) 11:46時点における版

やりたいこと

手順

app_dir/urls.py

 from django.views.generic import TemplateView  urlpatterns = [

    ...
    url(r'^robots\.txt', TemplateView.as_view(template_name='static/robots.txt', content_type='text/plain')),  # <- append

robots.txt を作成

touch template/robots.txt

facebook slideshare rubygems github qiita