how can i set the custom template pages html path in django
Hi Jaydip Solanki
To set a custom template path in Django, you need to configure the DIRS option in the TEMPLATES setting within your settings.py file. Here’s how you can do it:
Locate your settings.py file in your Django project.
Modify the TEMPLATES setting to include the path to your custom template directory. Look for a file of /django/starterkit/_keenthemes/settings.py, you would set it up as follows:
Change _templates to your custom template folder name. BASE_DIR is the project dir which is /django/starterkit/
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",
],
},
},
]