Hi everyone! I have a question for you.
I'm trying to override the builtin widgets defined by django.
I have tried to create a new file inside my app, where I have defined other templates. The path is templates/django/forms/widgets/input.html but it seems it does not work. This should work I think, but it is not 😦
The part I consider relevant from my settings:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'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',
],
},
},
]
class CustomFormRenderer(TemplatesSetting):
form_template_name = "form_snippet.html"
FORM_RENDERER = "website.settings.CustomFormRenderer"
Thanks in advance!