#21065: Internally choosing how to process a template is inconsistent
-------------------------------------+-------------------------------------
     Reporter:  Keryn Knight         |                    Owner:  nobody
  <django@…>                         |
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Template system      |                  Version:  dev
     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 bcail):

 * cc: bcail (added)

Comment:

 One option would be to add a `resolve_template()` method/function to the
 engine and loader modules. The `resolve_template()` function could handle
 choosing between `select_template()` and `get_template()`.

 This would allow removing `resolve_template()` in
 `SimpleTemplateResponse`, and `Engine.render_to_string` and
 `InclusionNode` could use the `resolve_template()` in the `engine` module.

 If there's interest in this, I could open a PR.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/21065#comment:6>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018da8ea08b5-41d7b2cc-b48a-4355-8cb1-2459ed12940f-000000%40eu-central-1.amazonses.com.

Reply via email to