[Django] #36381: Improve tutorial template to show a message when no choices are available

2 views
Skip to first unread message

Django

unread,
May 9, 2025, 2:20:55 PMMay 9
to django-...@googlegroups.com
#36381: Improve tutorial template to show a message when no choices are available
-------------------------------------+-------------------------------------
Reporter: Birendra Kumar | Type:
Sharma | Cleanup/optimization
Status: new | Component:
| Documentation
Version: dev | Severity: Normal
Keywords: tutorial, | Triage Stage:
documentation, template, | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
In the polls tutorial (polls/detail.html), the template currently loops
over choices without showing anything if none exist.
This change adds a condition to display a user-friendly message ("No
choices available for this question.") when no choices are present.
This improves clarity for beginners and makes the template more
informative without altering existing functionality.
--
Ticket URL: <https://code.djangoproject.com/ticket/36381>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages