Mercurial > public > sg101
comparison gpp/forums/unread.py @ 168:e6d4dfdfbc64
Implemented a view to display topics with unanswered posts. This is for ticket #54.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 26 Jan 2010 04:10:11 +0000 |
parents | cf9f9d4c4d54 |
children | d77e0dc772ad |
comparison
equal
deleted
inserted
replaced
167:cf9f9d4c4d54 | 168:e6d4dfdfbc64 |
---|---|
219 end_date=now) | 219 end_date=now) |
220 flv.save() | 220 flv.save() |
221 else: | 221 else: |
222 flv = flvs[forum.id] | 222 flv = flvs[forum.id] |
223 topics |= Topic.objects.filter(forum=forum, | 223 topics |= Topic.objects.filter(forum=forum, |
224 update_date__gt=flv.begin_date).order_by('-update_date').select_related() | 224 update_date__gt=flv.begin_date).order_by('-update_date').select_related( |
225 'forum', 'user', 'last_post', 'last_post__user') | |
225 | 226 |
226 if topics is not None: | 227 if topics is not None: |
227 # get all topic last visit records for the topics of interest | 228 # get all topic last visit records for the topics of interest |
228 | 229 |
229 tlvs = TopicLastVisit.objects.filter(user=user, topic__in=topics) | 230 tlvs = TopicLastVisit.objects.filter(user=user, topic__in=topics) |