Context
I want to override the following django templates:
django/contrib/admin/templates/admin/widgets/clearable_file_input.html
django/contrib/admin/templates/admin/auth/user/change_password.html
With these custom templates:
<project_root>/templates/admin/widgets/clearable_file_input.html
<project_root>/templates/admin/auth/user/change_password.html
My TEMPLATES
settings are configured as followed:
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",
],
},
},
]
Problem
While I have managed to successfully override a lot of other templates that exist in the django/contrib/admin/templates/admin/
path, I cannot seem to be able to override templates that exist in the paths mentioned above.
Regarding the widgets, I also tried the instructions found in the docs here and also adding FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
to no avail.