peeyush-tm / django-cube

Automatically exported from code.google.com/p/django-cube
GNU General Public License v3.0
1 stars 0 forks source link

template tag for 2d table (or plane) #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
very useful for tables in html

Original issue reported on code.google.com by seb...@gmail.com on 23 Jun 2010 at 2:28

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
{% plane firstname age as my_table %}

<tr>
    <th></th>
    {% for firstname in my_table.firstname_axis %}
    <th>{{ firstname }}</th>
    {% endfor %}
    <th>Sum</th>
</tr>
{% for age_row in my_table.age_rows %}
<tr>
    <th>{{ age_row.age }}</th>
    {% for val in age_row.values %}
    <td>{{ val }}</td>
    {% endfor %}
    <td>{{ age_row.sum }}</td>
</tr>
{% endfor %}

Original comment by seb...@gmail.com on 28 Jun 2010 at 9:12

GoogleCodeExporter commented 9 years ago
inclusion tag 'tablefromcube'

Original comment by seb...@gmail.com on 29 Jun 2010 at 11:29