Thanks,
I didn't know the {% ifchanged %} tag.
Martin
On Mon, 31 Jan 2011 22:58:55 +0100, Michael wrote:
The easiest way would be to get a list of all closed work items, ordered
by user:
context['work'] = Work.objects.filter(whatever).order_by('user')
{% for work_item in work %}
The easiest way would be to get a list of all closed work items, ordered
by user:
context['work'] = Work.objects.filter(whatever).order_by('user')
{% for work_item in work %}
{% ifchanged %}Display {{work_item.user}}{% endifchanged %}
Display {{ work_item }}
{% endfor %}
--
Mich
Hello,
I have a model:
class Work(models.Model):
...
user = models.ForeignKey(
User
)
closed = models.DateTimeField(
blank=True
)
...
Now, I want to print all users and for each user all Works closed between
a specific date. If I don't need the "closed
3 matches
Mail list logo