Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26376 closed Cleanup/optimization (fixed)

Explain what "searching for a list of template names" means in TemplateResponse.Mixin.get_template_names() docs.

Reported by: Thomas Güttler Owned by: nobody
Component: Documentation Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Thomas Güttler)

I am missing what "search" means in the current docs of get_template_names:

Returns a list of template names to search for when rendering the template.
If template_name is specified, the default implementation will return a list containing template_name (if it is specified).

https://docs.djangoproject.com/en/1.9/ref/class-based-views/mixins-simple/#django.views.generic.base.TemplateResponseMixin.get_template_names

What kind of searching does happen here?

I don't understand why a list gets returned and not a single name.

Change History (5)

comment:1 by Thomas Güttler, 8 years ago

Description: modified (diff)

comment:2 by Tim Graham, 8 years ago

Has patch: set
Summary: Docs for `get_template_names`Explain what "searching for a list of template names" means in TemplateResponse.Mixin.get_template_names() docs.
Triage Stage: UnreviewedAccepted

If I add "The first template that is found will be used." does it help? There are several other places in Django that have similar behavior so it's not really a new concept.

comment:3 by Thomas Güttler, 8 years ago

Yes "The first template that is found will be used." is more explicit than "searched". Thank you

comment:4 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 6dd50385:

Fixed #26376 -- Clarifed meaning of 'search' in TemplateResponseMixin.get_template_names() docs.

comment:5 by Tim Graham <timograham@…>, 8 years ago

In 4e80ec6a:

[1.9.x] Fixed #26376 -- Clarifed meaning of 'search' in TemplateResponseMixin.get_template_names() docs.

Backport of 6dd503851c91197364f7c7b915cabb604fadb755 from master

Note: See TracTickets for help on using tickets.
Back to Top