[Django] #20606: Non equivalent code example in template tag for…empty

2 views
Skip to first unread message

Django

unread,
Jun 15, 2013, 4:46:22 AM6/15/13
to django-...@googlegroups.com
#20606: Non equivalent code example in template tag for…empty
-------------------------------+--------------------
Reporter: batisteo | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords: typo
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
There is two different versions of code that should be equivalent, but
there are two differences, which are a **plural** and an **exclamation
mark**.

{{{#!python
{% empty %}
<li>Sorry, no athlete in this list!</li>
{% endfor %}
}}}

{{{#!python
{% else %}
<li>Sorry, no athletes in this list.</li>
{% endif %}
}}}

We might keep the second version I think.

[https://docs.djangoproject.com/en/def/ref/templates/builtins/#for-empty]

--
Ticket URL: <https://code.djangoproject.com/ticket/20606>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 15, 2013, 4:56:49 AM6/15/13
to django-...@googlegroups.com
#20606: Non equivalent code example in template tag for…empty
-------------------------------+------------------------------------

Reporter: batisteo | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: typo | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by bmispelon):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


Comment:

The plural form is the correct one.

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

--
Ticket URL: <https://code.djangoproject.com/ticket/20606#comment:1>

Django

unread,
Jun 15, 2013, 6:00:10 AM6/15/13
to django-...@googlegroups.com
#20606: Non equivalent code example in template tag for…empty
-------------------------------+------------------------------------

Reporter: batisteo | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: typo | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Description changed by claudep:

Old description:

> There is two different versions of code that should be equivalent, but
> there are two differences, which are a **plural** and an **exclamation
> mark**.
>
> {{{#!python
> {% empty %}
> <li>Sorry, no athlete in this list!</li>
> {% endfor %}
> }}}
>
> {{{#!python
> {% else %}
> <li>Sorry, no athletes in this list.</li>
> {% endif %}
> }}}
>
> We might keep the second version I think.
>
> [https://docs.djangoproject.com/en/def/ref/templates/builtins/#for-empty]

New description:

There is two different versions of code that should be equivalent, but
there are two differences, which are a **plural** and an **exclamation
mark**.

{{{#!python
{% empty %}
<li>Sorry, no athlete in this list!</li>
{% endfor %}
}}}

{{{#!python
{% 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]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/20606#comment:2>

Django

unread,
Jun 15, 2013, 6:20:10 AM6/15/13
to django-...@googlegroups.com
#20606: Non equivalent code example in template tag for…empty
-------------------------------+------------------------------------
Reporter: batisteo | Owner: batisteo
Type: Bug | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: typo | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by batisteo):

* owner: nobody => batisteo
* cc: baptiste+django-code@… (added)
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/20606#comment:3>

Django

unread,
Jun 15, 2013, 6:48:33 AM6/15/13
to django-...@googlegroups.com
#20606: Non equivalent code example in template tag for…empty
-------------------------------+------------------------------------
Reporter: batisteo | Owner:

Type: Bug | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: typo | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by batisteo):

* owner: batisteo =>
* status: assigned => new


Comment:

Fixed in bf9975b0eb5f839ac5ff53b4fb302548dde6a418 by claudep

--
Ticket URL: <https://code.djangoproject.com/ticket/20606#comment:4>

Django

unread,
Jun 15, 2013, 6:48:47 AM6/15/13
to django-...@googlegroups.com
#20606: Non equivalent code example in template tag for…empty
-------------------------------+------------------------------------
Reporter: batisteo | Owner:
Type: Bug | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

Keywords: typo | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by batisteo):

* status: new => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/20606#comment:5>

Reply all
Reply to author
Forward
0 new messages