'Uncategorized' Category

  • Шамаев А.Э. & SemLP

    September 10, 2009

    Sorry, this entry is only available in Русский.

  • {% with %}

    July 8, 2009

    There is a very usufull tag in django templates which lets to remove duplication very smoothly. For instance, you  have 30 places in some template where you’d like to put a state of something, e.g.  ’Loding data…’ or ‘Ready’, and you have 30 instances of some object that return those states through a method called […]

  • Odd-even table rows with Django

    July 2, 2009

    Using the following code you can color table rows in django templates:: <table> {% for item in data %} <tr {% if not forloop.counter|divisibleby:”2″ %} class=”odd” {% endif %} > <td> {{item.name}} </td> </tr> {% endfor %} </table> P.S. You can also use {% cycle %}

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org