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 + F and type elif you will reach there




On Wed, Dec 28, 2011 at 12:38 PM, Tsung-Hsien <jasoniem9...@gmail.com>wrote:

> Thank you all!
>
> I don't see the line
> "New in Django Development version."
>
> On Dec 27, 10:44 pm, Tsung-Hsien <jasoniem9...@gmail.com> wrote:
> > Hi,
> > I want to use {% elif %}
> > my template:
> >                         {% if bookmark.hours %}
> >                                 {{ bookmark.hours }} hours ago
> >                         {% elif bookmark.days %}
> >                                 {{ bookmark.days }} days ago
> >                         {% elif bookmark.months %}
> >                                 {{ bookmark.months }} months ago
> >                         {% else %}
> >                                  {{ bookmark.years }} years ago
> >                         {% endif %}
> >
> > show error:
> > Invalid block tag: 'elif', expected 'else' or 'endif'
> >
> > It can work without elif, if use if...else loop.
> >
> > my django version is 1.31
> >
> > how to solve this?
> > thanks!!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Regards
Nikhil Verma
+91-958-273-3156

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to