#33345: Forms does not search external template directories
-------------------------------------+-------------------------------------
Reporter: Guillaume | Owner: nobody
Quenneville |
Type: Bug | Status: new
Component: Template | Version: 4.0
system | Keywords: template discovery
Severity: Normal | forms
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
It seems like the new form templates ignores external template
directories? (or I did something silly). It works for app's local template
directory.
I created a test repo
https://github.com/GuillaumeQuenneville/djangoform.git
Django finds home.html (parent template) but does not find the
item_form.html template in the same dir.
Adding the form template to the test app's local templates folder fixes
the discovery issue (rename item_form.html.bk -> item_form.html in repo)
As a test, I turned on the debugger before the render in the view. Calling
render(request, 'home.html') returns a 200 and no error, calling
form.render(template_name='home.html') says home.html not found, idem for
form.render() saying item_form.html not found. So there is a difference in
template discovery??
--
Ticket URL: <https://code.djangoproject.com/ticket/33345>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/063.760677d07ac4ff8a52b1ccc58b976928%40djangoproject.com.