Opened 11 years ago

Closed 11 years ago

#20606 closed Bug (fixed)

Non equivalent code example in template tag for…empty

Reported by: Baptiste Darthenay Owned by:
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 Claude Paroz)

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 (5)

comment:1 by Baptiste Mispelon, 11 years ago

Triage Stage: UnreviewedAccepted

The plural form is the correct one.

As for the exclamation mark, I'm fine either way.

comment:2 by Claude Paroz, 11 years ago

Description: modified (diff)

comment:3 by Baptiste Darthenay, 11 years ago

Cc: baptiste+django-code@… added
Owner: changed from nobody to Baptiste Darthenay
Status: newassigned

comment:4 by Baptiste Darthenay, 11 years ago

Owner: Baptiste Darthenay removed
Status: assignednew

comment:5 by Baptiste Darthenay, 11 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top