https://docs.djangoproject.com/en/dev/ref/templates/builtins/#firstof
2011/12/28 Nikhil Verma
> Go to this link
>
> https://docs.djangoproject.com/en/dev/ref/templates/builtins/
>
> {% if athlete_list %}
>
> Number of athletes: {{ athlete_list|length }}
> *{% elif athlete_in_locker_room_list
Go to this link
https://docs.djangoproject.com/en/dev/ref/templates/builtins/
{% if athlete_list %}
Number of athletes: {{ athlete_list|length }}
*{% elif athlete_in_locker_room_list %}*
Athletes should be out of the locker room soon!
{% else %}
No athletes.
{% endif %}
press CLTR +
Thank you all!
I don't see the line
"New in Django Development version."
On Dec 27, 10:44 pm, Tsung-Hsien wrote:
> Hi,
> I want to use {% elif %}
> my template:
> {% if bookmark.hours %}
> {{ bookmark.hours }} hours ago
>
There's no {% elif %}. You'll have to do:
{% if bookmark.hours %}
{{bookmark.hours}} hours ago
{% else %}
{% if bookmark.days %}
{{ bookmark.days }} days ago
{% else %}
{% if bookmark.months %}
{{ bookmark.months }} months ago
{% else %}
{{ bookmark.years }} years
Hi
It is available in dev/trunl version not this version.
This is dev version docs
https://docs.djangoproject.com/en/dev/ref/templates/builtins/
On Wed, Dec 28, 2011 at 12:20 PM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:
> On Wed, Dec 28, 2011 at 2:44 PM, Tsung-Hsien
> wrote:
> >
Or back port the elif tag (which may or may not be non trivial).
On Wednesday, December 28, 2011 at 1:50 AM, Russell Keith-Magee wrote:
> On Wed, Dec 28, 2011 at 2:44 PM, Tsung-Hsien (mailto:jasoniem9...@gmail.com)> wrote:
> > Hi,
> > I want to use {% elif %}
> > my template:
> >
On Wed, Dec 28, 2011 at 2:44 PM, Tsung-Hsien wrote:
> Hi,
> I want to use {% elif %}
> my template:
> {% if bookmark.hours %}
> {{ bookmark.hours }} hours ago
> {% elif bookmark.days %}
> {{
Hi,
I want to use {% elif %}
my template:
{% if bookmark.hours %}
{{ bookmark.hours }} hours ago
{% elif bookmark.days %}
{{ bookmark.days }} days ago
{% elif book
8 matches
Mail list logo