Dez 17, 20193:33 AM - bearbeitet Dez 17, 20196:10 AM
Mitglied
HubDB - group data
lösung
Hello.
I managed to group my rows by date. The problem I have now - it prints the ids of the dates, I can't set any datetimeformat when printing {{ group.grouper }}
Also when I add a second group option into the first one, it just doubles the content
An example of my code ({{ group.grouper|datetimeformat('%H %p') }} just doesn't work, it sends an error):
{% for group1 in table|groupby('date') %}
<p>{{ group.grouper|datetimeformat('%H %p') }}</p>
{% for group in table|groupby('time') %}
<p>{{ group.grouper }}</p>
{% for row in group.list %}
<div class="delivery">
<p>{{ row.name }}</p>
<p><a href="{{ row.url }}">Url</a></p>
</div>
{% endfor %}
{% endfor %}
{% endfor %}