#36302: Reusable form templates documentation is incomplete and results in an error
when used as documented
--------------------------------+-----------------------------------------
Reporter: Kevin Renskers | Type: Uncategorized
Status: new | Component: Documentation
Version: 5.1 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+-----------------------------------------
The documentation (
https://docs.djangoproject.com/en/5.1/topics/forms
/#reusable-form-templates) for reusable form templates results in a server
error.
1. You create the template file
2. You add and configure the CustomFormRenderer in settings.py
I've done both exactly as documented. I then used {{ form }} in a HTML
template and got the following error from Django:
{{{
TemplateDoesNotExist at /
django/forms/label.html
}}}
According to the docs though, "The example below will result in {{ form }}
being rendered as the output of the form_snippet.html template." I am not
sure which steps are missing from the documentation, but it seems that
''something's'' missing.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36302>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.