I have just thought of a simple - still ugly - fix to my
problem (remember, a method that return a dict, and my
template rerunning the method for each key of the dictionary).

Previously I had something like:
-------------------------------------
{% for slave in master.get_slaves %}
    {{ slave.dict_keyA }}
    {{ slave.dict_keyB }}
    {{ slave.dict_keyC }}
{% endfor %}
-------------------------------------

Even if the method will always return one and only one dict of
statistics, I could write it like:
-------------------------------------
{% for slave in master.get_slaves %}
    {% for my_dict in slave.get_statistics %}
        {{ my_dict.keyA }}
        {{ my_dict.keyB }}
        {{ my_dict.keyC }}
    {% endfor %}
{% endfor %}
-------------------------------------

Not very logic to me, but it works.

Meanwhile, I had a closer look at template tags. This part
could have been more documented, but James Bennett's tutorials
came to rescue, and I think this feature of Django templates
could benefit better advertising.

Cet été, pensez aux cartes postales de laposte.net !



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to