#36044: Reusable form templates example lead to a TemplateDoesNotExist error
------------------------------------+--------------------------------------
     Reporter:  Guillaume LEBRETON  |                    Owner:  (none)
         Type:  Uncategorized       |                   Status:  new
    Component:  Documentation       |                  Version:  5.1
     Severity:  Normal              |               Resolution:
     Keywords:                      |             Triage Stage:  Unreviewed
    Has patch:  0                   |      Needs documentation:  0
  Needs tests:  0                   |  Patch needs improvement:  0
Easy pickings:  0                   |                    UI/UX:  0
------------------------------------+--------------------------------------
Changes (by Guillaume LEBRETON):

 * resolution:  invalid =>
 * status:  closed => new

Comment:

 You're right, i didn't configure `TemplateSetting`, because in the doc
 paragraph https://docs.djangoproject.com/en/5.1/topics/forms/#reusable-
 form-templates, there's no mention of any prior conffiguration needed. It
 says you have to configure a form renderer, and in the link there's 3
 different form renderers:
 https://docs.djangoproject.com/en/5.1/ref/settings/#form-renderer, but
 somehow the one that doesn't need configuration is not used in the
 example.

 Let me summarize how a user would use the doc, here is the actual
 situation:
 - You create a new django project, without any customization
 - You create a form view
 - You copy paste snippets from
 https://docs.djangoproject.com/en/5.1/topics/forms/#reusable-form-
 templates
 - You have an error about missing templates
 - You click on https://docs.djangoproject.com/en/5.1/ref/settings/#std-
 setting-FORM_RENDERER
 - You click on
 
https://docs.djangoproject.com/en/5.1/ref/forms/renderers/#django.forms.renderers.TemplatesSetting
 - Put `django.forms` in installed apps
 - Scratch your head about where to put this snippet
 {{{
 import django

 django.__path__[0] + "/forms/templates"  # or '/forms/jinja2'
 }}}
 - Realize that this one was not necessary for the example, and profit, the
 example is working

 ----

 Now, with having `DjangoTemplates` instead of `TemplatesSetting`:
 - You create a new django project, without any customization
 - You create a form view
 - You copy paste snippets from
 https://docs.djangoproject.com/en/5.1/topics/forms/#reusable-form-
 templates
 - It's working, and you can start have customized form templates.

 So maybe i missed a point and i hope you will tell me before closing the
 ticket, but as an end user of the documentation it seems for me unecessary
 complicated. With `DjangoTemplates` you go straight to the point, and you
 can re-use form templates, just as the docs sections says
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36044#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701942122e5f6-683823c5-56f1-40b6-950e-54e3d63bbbe4-000000%40eu-central-1.amazonses.com.

Reply via email to