#31729: The documentation for ArchiveIndexView is not clear for new developers
----------------------------------------------+------------------------
               Reporter:  Kenneth Prabakaran  |          Owner:  nobody
                   Type:  Uncategorized       |         Status:  new
              Component:  Uncategorized       |        Version:  3.0
               Severity:  Normal              |       Keywords:
           Triage Stage:  Unreviewed          |      Has patch:  0
    Needs documentation:  0                   |    Needs tests:  0
Patch needs improvement:  0                   |  Easy pickings:  1
                  UI/UX:  0                   |
----------------------------------------------+------------------------
 path('archive/',
          ArchiveIndexView.as_view(model=Article, date_field="pub_date"),
          name="article_archive"),

 where the only mentioned parameters are model and pub_date, and the name
 for the template. But using this above code does lead to an error saying
 template not found. Where the main problem is we are supposed to

 path('archive/',
          ArchiveIndexView.as_view(model=Article, date_field="pub_date",
 template_name="article_archive.html"),
          ),

 mention the template_name as paramter for the as_view function. I know it
 might be silly to just look into the class and find the attribute
 "template_name" but for new comers trying to implement this might think
 they made a mistake somewhere else since the path was taking in the name
 of the template.
 So please do mention in the documentation

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31729>
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/049.57bf3f13677ddeb942554b204a95e906%40djangoproject.com.

Reply via email to