adding templates in django code example
Example 1: make new app folder in django templates dir
#settings.py
TEMPLATES = [
{
...
'DIRS': [os.path.join(BASE_DIR, 'templates'),
os.path.join(BASE_DIR, 'templates', 'the_folder_you_created'),
...
]
}
]
Example 2: how to connect templates in django
# Template directory setting
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
)