Why Heroku can't find my Django templates?
I deployed my project on Heroku. But it can't find my templates(Source doesn't exist):
My project architecture:
settings.py:
from pathlib import Path
import sys
import os
BASE_DIR = Path(__file__).resolve().parent.parent
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(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',
],
},
},
]
The problem is solved. There was extra whitespace, like {% extends 'base/base.html ' %}