Opened 11 years ago
Last modified 11 years ago
#20606 closed Bug
Non equivalent code example in template tag for…empty — at Version 2
Reported by: | Baptiste Darthenay | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | typo |
Cc: | baptiste+django-code@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
There is two different versions of code that should be equivalent, but there are two differences, which are a plural and an exclamation mark.
{% empty %} <li>Sorry, no athlete in this list!</li> {% endfor %}
{% else %} <li>Sorry, no athletes in this list.</li> {% endif %}
We might keep the second version I think.
https://docs.djangoproject.com/en/dev/ref/templates/builtins/#for-empty
Change History (2)
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 11 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
The plural form is the correct one.
As for the exclamation mark, I'm fine either way.