Thanks. I said to hell with it and just used the custom view. After
hacking it so long, I couldn't remember why I was trying to use a
generic view in the first place.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I can do that for the recent topics (was trying not to, thinking it
> would be more efficient to handle it in the view), but what about
> something like last_seen, which is different for each user, as it's
> calculated from their session:
I can do that for the recent topics (was trying not to, thinking it
would be more efficient to handle it in the view), but what about
something like last_seen, which is different for each user, as it's
calculated from their session:
if i.topic_modification_date > request.session['last_seen']:
Just a guess but topics is a queryset which goes to db and gets each
item which you then modify locally before calling object_list. Now
object list gets items from topics again but they are probably newly
generated objects so do not have a recent_posts attribute.
Why not just access {{post.post_
I'm trying to use a generic list view like this:
def latest_topic_list(request):
from django.views.generic.list_detail import object_list
topics =
Topic.objects.order_by('-topic_modification_date')[:40]
for i in topics:
if i.topic_modification_date >
reques
5 matches
Mail list logo