Completely note.
Template search order example
django.template.loaders.filesystem.Loader: /Users/01013548/repositories/evolve/django_training/mysite/templates/index.html (Source does not exist)
django.template.loaders.app_directories.Loader: /Users/01013548/.pyenv/versions/3.5.2/lib/python3.5/site-packages/django/contrib/admin/templates/index.html (Source does not exist)
django.template.loaders.app_directories.Loader: /Users/01013548/.pyenv/versions/3.5.2/lib/python3.5/site-packages/django/contrib/auth/templates/index.html (Source does not exist)
django.template.loaders.app_directories.Loader: /Users/01013548/repositories/evolve/django_training/mysite/myapp/templates/index.html (Source does not exist)
As a search destination
For 1, os.path.join (BASE_DIR,'templates') in TEMPLATE.DIRS inside setting.py Since it is specified, it seems that it is out.
As for 2 and 3, it seems that they can be searched because TEMPLATES.APP_DIRS inside setting.py is set to True. (False no longer searches)
Recommended Posts