However, Django will throw an django.template.exceptions.TemplateDoesNotExist when you use a different layout from above, such as when you have a single ‘templates’ folder located under your project instead of under individual apps:

project
- app1_name
- app2_name
templates

In order for this to work, you will need to tell Django to locate the templates folder in the base directory.

The fix is to edit your Django settings file, locate the ‘TEMPLATES’ tuple, and add [os.path.join(BASE_DIR, ‘templates’)]
as shown below:

Rate this article

User Review

I am a Software Engineer from Houston, TX who love to write codes that brings great ideas to live.
In my professional life, I have created software for different industries including Oil & Gas, Finance, Service Provider, Cloud Computing and Embedded Systems. When not writting codes, i enjoy travelling, good music and photography.
You can reach me at me@matthiasomisore.com.