Kaydet (Commit) b66a51ad authored tarafından Tim Graham's avatar Tim Graham

Fixed #21195 -- Clarifed usage of template_name in tutorial part 4.

üst c1c44b25
...@@ -271,7 +271,7 @@ two views abstract the concepts of "display a list of objects" and ...@@ -271,7 +271,7 @@ two views abstract the concepts of "display a list of objects" and
By default, the :class:`~django.views.generic.detail.DetailView` generic By default, the :class:`~django.views.generic.detail.DetailView` generic
view uses a template called ``<app name>/<model name>_detail.html``. view uses a template called ``<app name>/<model name>_detail.html``.
In our case, it'll use the template ``"polls/question_detail.html"``. The In our case, it would use the template ``"polls/question_detail.html"``. The
``template_name`` attribute is used to tell Django to use a specific ``template_name`` attribute is used to tell Django to use a specific
template name instead of the autogenerated default template name. We template name instead of the autogenerated default template name. We
also specify the ``template_name`` for the ``results`` list view -- also specify the ``template_name`` for the ``results`` list view --
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment