[Django] #36302: Reusable form templates documentation is incomplete and results in an error when used as documented

9 views
Skip to first unread message

Django

unread,
Apr 5, 2025, 5:00:10 AMApr 5
to django-...@googlegroups.com
#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.

Django

unread,
Apr 6, 2025, 8:48:52 PMApr 6
to django-...@googlegroups.com
#36302: Reusable form templates documentation is incomplete and results in an error
when used as documented
--------------------------------+------------------------------------
Reporter: Kevin Renskers | Owner: (none)
Type: Bug | Status: new
Component: Documentation | Version: 5.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------
Changes (by Antoliny):

* stage: Unreviewed => Accepted
* type: Uncategorized => Bug

Comment:

I believe this issue can be resolved by adding `django.forms` to
INSTALLED_APPS, even though it’s a bit unusual since `django.forms` isn’t
actually an app. I encountered this issue myself, and I think it would be
helpful if the documentation included a note about this.
--
Ticket URL: <https://code.djangoproject.com/ticket/36302#comment:1>

Django

unread,
Apr 7, 2025, 4:42:17 AMApr 7
to django-...@googlegroups.com
#36302: Reusable form templates documentation is incomplete and results in an error
when used as documented
--------------------------------+----------------------------------------
Reporter: Kevin Renskers | Owner: Ahmed Nassar
Type: Bug | Status: assigned
Component: Documentation | Version: 5.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+----------------------------------------
Changes (by Ahmed Nassar):

* owner: (none) => Ahmed Nassar
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36302#comment:2>

Django

unread,
Apr 7, 2025, 5:50:22 AMApr 7
to django-...@googlegroups.com
#36302: Reusable form templates documentation is incomplete and results in an error
when used as documented
--------------------------------+----------------------------------------
Reporter: Kevin Renskers | Owner: Ahmed Nassar
Type: Bug | Status: closed
Component: Documentation | Version: 5.1
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+----------------------------------------
Changes (by Sarah Boyce):

* resolution: => duplicate
* status: assigned => closed

Comment:

Duplicate of #36044
--
Ticket URL: <https://code.djangoproject.com/ticket/36302#comment:3>

Django

unread,
Apr 7, 2025, 1:18:27 PMApr 7
to django-...@googlegroups.com
#36302: Reusable form templates documentation is incomplete and results in an error
when used as documented
--------------------------------+----------------------------------------
Reporter: Kevin Renskers | Owner: Ahmed Nassar
Type: Bug | Status: closed
Component: Documentation | Version: 5.1
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+----------------------------------------
Comment (by Ahmed Nassar):

If the ticket is closed, I can't work on it. Right? If there is another
ticket easy, let me know, I will happy to work on it.
--
Ticket URL: <https://code.djangoproject.com/ticket/36302#comment:4>

Django

unread,
Apr 8, 2025, 2:37:53 AMApr 8
to django-...@googlegroups.com
#36302: Reusable form templates documentation is incomplete and results in an error
when used as documented
--------------------------------+----------------------------------------
Reporter: Kevin Renskers | Owner: Ahmed Nassar
Type: Bug | Status: closed
Component: Documentation | Version: 5.1
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+----------------------------------------
Comment (by Antoliny):

Replying to [comment:4 Ahmed Nassar]:
> If there is another ticket easy, let me know, I will happy to work on
it.

Hello Ahmed Nassar!
First of all, I’m sorry.
I should’ve double-checked before accepting this ticket — it turns out
someone had already created a ticket regarding this issue.

From what I saw in the previous ticket, it seems like there was a
discussion on the forum, and the conclusion was to keep the documentation
as it is now.

To be honest, I personally feel that the documentation is a bit lacking,
and a small note could make it better.
(Not everyone has a deep understanding of Django, and for beginners, small
issues like this can lead to a very frustrating experience.)

Anyway, thank you for taking interest in this issue and trying to improve
it!
--
Ticket URL: <https://code.djangoproject.com/ticket/36302#comment:5>
Reply all
Reply to author
Forward
0 new messages