[Answered ]-In Django, how to include template folder I have created with the base file named base.html on settings.py?

2👍

The documentation suggests placing your template directories in TEMPLATES DIRS

TEMPLATES = [
{
    'BACKEND': 'django.template.backends.django.DjangoTemplates',
    'DIRS': [
        BASE_DIR + '/templates/'
    ],
    'APP_DIRS': True,
    'OPTIONS': {
        'context_processors': [
            'django.template.context_processors.debug',
            'django.template.context_processors.request',
            'django.contrib.auth.context_processors.auth',
            'django.contrib.messages.context_processors.messages',
        ],
    },
},]

You should also use os.path.join(BASE_DIR, 'templates') to get your template path.

https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-TEMPLATES

Leave a comment