Dondariadmin (トーク | 投稿記録) (→app_dir/urls.py) |
Dondariadmin (トーク | 投稿記録) |
||
14行目: | 14行目: | ||
=== robots.txt を作成 === | === robots.txt を作成 === | ||
− | touch template/robots.txt | + | touch template/static/robots.txt |
from django.views.generic import TemplateView urlpatterns = [ ... url(r'^robots\.txt', TemplateView.as_view(template_name='static/robots.txt', content_type='text/plain')), # <- append
touch template/static/robots.txtTweet