Maybe I am failing to understand something…
In the docs it says that if you want to use a custom form template, you either create a renderer and configure it in the settings or you just put the path to the template in the form class as “template_name”.
What I am failing to understand is:
- is it only for the Form class, or ModelForm also has it?
- When I point to the path “template_name”, do I have to specify the renderer?
It somehow remains a mystery in the docs.
In my case, I provide a path to the template_name in MyForm(ModelForm) but Django raises TemplateDoesNotExist and in the logs it is giving paths only to site-packages in venv and not in the template directory.
I tried using the render method but again it failed.
Is this feature available for ModelForms.