Re: django-voting question
Thanks Samuel. I tried that, too, but all p.X seemed to return was the index of the tuple (1, 2, etc). On Sep 12, 2:54 pm, Samuel Adam <[EMAIL PROTECTED]> wrote: > Try this : > > {% for p in posts %} > {{ p.0 }} > {{ p.1 }} > {% endfor %} > > :P --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django-voting question
Try this : {% for p in posts %} {{ p.0 }} {{ p.1 }} {% endfor %} :P --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django-voting question
> How about something like this: > > {% for p in posts %} > {{ p.headline }} > {{ p.body }} > {% endfor %} That's what I thought SHOULD work, but it's not. I think I may just take a different route with it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django-voting question
> > Problem is, I can't manage to do anything with posts in my template. What exactly are you trying to do that's not working? > When I view source, I see an object reference, so I know it's getting > there, and I know this is probably a terribly dumb question, but how > do I access posts? How about something like this: {% for p in posts %} {{ p.headline }} {{ p.body }} {% endfor %} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
django-voting question
I'm trying to use django-voting's get_top function: ``get_top(Model, limit=10, reversed=False)`` -- Gets the top ``limit`` scored objects for a given model. If ``reversed`` is ``True``, the bottom ``limit`` scored objects are retrieved instead. Yields ``(object, score)`` tuples. So I've got: posts = Vote.objects.get_top(Post, limit=25, reversed=False) and I retun posts to my template Problem is, I can't manage to do anything with posts in my template. When I view source, I see an object reference, so I know it's getting there, and I know this is probably a terribly dumb question, but how do I access posts? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---