Hi all!

I've been working with Django for a while now, but today I decided to
make a first contribution to Django that would make templates less
ugly by adding these two values to loop_dict (in django/template/
defaulttags.py):

loop_dict['even'] = (i %2 == 0)
loop_dict['odd'] = (i %2 != 0)

Using {% if forloop.even %} would be more clear and readable than {%
if forloop|divisibleby:"2" %}.
As I am new to working *on* Django I don't know the history of this
idea (if there is one) and the correct way of sending patches, all
comments (and corrections!) are appreciated!


-Karlis Lauva /skazhy/

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

Reply via email to