Django by default will look for the ‘templates’ folder under each app. For example below template folders will be located by default:

   - app1_name
   - app2_name

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:

  - app1_name
  - app2_name

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:

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
Rate this article
User Review
0 (0 votes)

About Matthias 33 Articles
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

Be the first to comment

Leave a Reply

Your email address will not be published.