Custom template tag for django-voting

2012-03-27 Thread Fabio Natali
Hi everybody, I have a weird problem with a custom template tag I made. The template tag is built on top of django-voting app and provides upvote and downvote counts, while standard django-voting tags only provides total number of votes and score. Here is the snippet I wrote: http

Re: django-voting : How to get objects with number of votes.

2011-05-06 Thread AJ
I am not aware what 'relations' can do or if there was anything like 'relations' let alone 'GenericRelations' :) What does the Sum('vote') done? -- 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

Re: django-voting : How to get objects with number of votes.

2011-05-06 Thread Jason Culverhouse
On May 6, 2011, at 8:35 AM, Shawn Milochik wrote: > Sorry, I was going off of your pasted code. > > Sounds like this could be a case for annotate. > http://docs.djangoproject.com/en/1.3/ref/models/querysets/#annotate > > I recommend reading this whole page, along with the two prerequisite pages

Re: django-voting : How to get objects with number of votes.

2011-05-06 Thread Shawn Milochik
Sorry, I was going off of your pasted code. Sounds like this could be a case for annotate. http://docs.djangoproject.com/en/1.3/ref/models/querysets/#annotate I recommend reading this whole page, along with the two prerequisite pages called for at the top. It'll help a lot. -- You received th

Re: django-voting : How to get objects with number of votes.

2011-05-06 Thread AJ
Appreciate your response, Shawn. I am a newbie and struggling. Yea, but that is 'latest'. I need ascending descending order by score/votes. Can't seem to figure that one out. That would go in the else part. By default in my app, I want the comments to be sorted by vote/score. else:#This is

Re: django-voting : How to get objects with number of votes.

2011-05-06 Thread Shawn Milochik
You could probably sort ascending, take a subset, then reverse the search. Something like this: | .order_by('created_datetime', 'modified_datetime')[:100].reverse()| -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Django-voting

2011-03-11 Thread ydjango
I see this project is an old project http://code.google.com/p/django-voting/ Not sure if it is actively maintained anymore. is this the one I should look into using or is there a newer one that super seeded this app. -- You received this message because you are subscribed to the Google Groups

Re: django-voting url pattern

2010-11-03 Thread Sithembewena Lloyd Dube
ne > > supplied by django-voting. That correct? > > I'm not familiar with django-voting, but yes that sounds right. > -- > DR. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this gr

Re: django-voting url pattern

2010-11-02 Thread Daniel Roseman
On Nov 1, 3:08 pm, Sithembewena Lloyd Dube wrote: > Thanks Daniel, makes sense. Also, I was making the mistake of thinking that > I had to create a separate view, forgetting that I am calling the one > supplied by django-voting. That correct? I'm not familiar with django-voting

Re: django-voting url pattern

2010-11-01 Thread Sithembewena Lloyd Dube
Thanks Daniel, makes sense. Also, I was making the mistake of thinking that I had to create a separate view, forgetting that I am calling the one supplied by django-voting. That correct? On Mon, Nov 1, 2010 at 3:45 PM, Daniel Roseman wrote: > On Nov 1, 1:23 pm, Sithembewena Lloyd Dube wr

Re: django-voting url pattern

2010-11-01 Thread Daniel Roseman
On Nov 1, 1:23 pm, Sithembewena Lloyd Dube wrote: > Hi all, > > I have django-voting installed and am trying to get through the 'recipe'.  I > have a url pattern which (I expect) should route voting actions to a view. > > Problem is, which view or views should handle

django-voting url pattern

2010-11-01 Thread Sithembewena Lloyd Dube
Hi all, I have django-voting installed and am trying to get through the 'recipe'. I have a url pattern which (I expect) should route voting actions to a view. Problem is, which view or views should handle this? The URL pattern is as follows: (r'^videos/(?P\d+)/(?P*up|d

Re: question about facebook connect and django voting

2009-11-13 Thread Hector Garcia
cebook friends) for a user - these users are > objects of the Django User model: > [friend1,friend2, friend3..] > > I use the django voting app where users can vote on an item. > > the resulting page has 10 items and for each item, it will list all > the friends who have voted

question about facebook connect and django voting

2009-11-12 Thread uno...@gmail.com
I'm trying to find the most efficient way to accomplish the below: I have a list of users (facebook friends) for a user - these users are objects of the Django User model: [friend1,friend2, friend3..] I use the django voting app where users can vote on an item. the resulting page has 10

Re: problem with django-voting

2009-03-14 Thread Frank Wiles
On Fri, Mar 13, 2009 at 6:03 PM, Shantp wrote: > > I'm getting this error: > > AttributeError: 'NoneType' object has no attribute 'append' > > It's coming from this line in my template: > > {% scores_for_objects share_list as score_dict %} > > If I remove this line everything is fine. I wasn't ge

problem with django-voting

2009-03-13 Thread Shantp
I'm getting this error: AttributeError: 'NoneType' object has no attribute 'append' It's coming from this line in my template: {% scores_for_objects share_list as score_dict %} If I remove this line everything is fine. I wasn't getting this error before but I had to wipe my server and create a

Determining the rank of an object with django-voting

2008-09-16 Thread M Godshall
I'm using a modified version of the django-voting app to handle the rating of objects on a site I'm working on. I'd like to figure out a way to display the rank of an object in relation to all other objects in the same model. It would seem that I would have to calculate the av

Re: Django voting with jellyrool

2008-04-26 Thread Chatchai Neanudorn
*Sorry for confusing,my English is bad also. The problem is django-voting is not provide templatetags to access vote for particular object. Instead it provide templatetags to access only template context variable (Correct me if I'm wrong). See bebow, score_for_object Retr

Re: Django voting with jellyrool

2008-04-26 Thread [EMAIL PROTECTED]
tem).  For example, > > Item.objects.follow_model(Post) > > After that, I added django-voting (http://django- > voting.googlecode.com/) to my application list. > > The problem is, at the index page. I want to list latest item. If > latest item is Post and it has Vote as well, I will show post

Django voting with jellyrool

2008-04-25 Thread chatchai
Hi all, I use a modified version of http://jellyroll.googlecode.com/ by adding my own models into follow list (jellyrool.models.Item). For example, Item.objects.follow_model(Post) After that, I added django-voting (http://django- voting.googlecode.com/) to my application list. The problem is

django-voting and sites framework

2008-04-04 Thread [EMAIL PROTECTED]
I'm using django-voting on a model shared across two sites. I get the top-rated objects with get_top: best = Vote.objects.get_top(Foo, limit=50, reversed=False) But it's bringing up the top-rated from both sites I need to just get the ones for the current site.

Re: django-voting

2007-11-17 Thread tanukichan
I see. Thanks for the response. I appreciate 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 gro

Re: django-voting

2007-11-17 Thread Karen Tracey
On Nov 17, 2007 3:42 AM, tanukichan <[EMAIL PROTECTED]> wrote: > > When looking at the example given in the overview.txt file for django- > voting (http://django-voting.googlecode.com/svn/trunk/docs/ > overview.txt), they give the following: > > "Votes are rec

django-voting

2007-11-17 Thread tanukichan
When looking at the example given in the overview.txt file for django- voting (http://django-voting.googlecode.com/svn/trunk/docs/ overview.txt), they give the following: "Votes are recorded using the ``record_vote`` helper function:: >>> from django.contrib.auth.mode

Re: django-voting question

2007-09-13 Thread [EMAIL PROTECTED]
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 --~--~-~--~~-

Re: django-voting question

2007-09-12 Thread Samuel Adam
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@googlegro

Re: django-voting question

2007-09-12 Thread [EMAIL PROTECTED]
> 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

Re: django-voting question

2007-09-12 Thread RajeshD
> > 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

django-voting question

2007-09-12 Thread [EMAIL PROTECTED]
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)``

Re: django-voting and django-tagging error

2007-08-30 Thread Benoit Chesneau
If you use trunk. problem was fixed. - benoît On 8/30/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 8/30/07, Kelsey Ruger <[EMAIL PROTECTED]> wrote: > > > > I just checked out the latest versions of django-voting and django- > > tagging. When attemptin

Re: django-voting and django-tagging error

2007-08-30 Thread Jeremy Dunck
On 8/30/07, Kelsey Ruger <[EMAIL PROTECTED]> wrote: > > I just checked out the latest versions of django-voting and django- > tagging. When attempting a syncdb I get the following error - tagging: > 'DatabaseWrapper' object has no attribute 'ops' or vot

django-voting and django-tagging error

2007-08-30 Thread Kelsey Ruger
I just checked out the latest versions of django-voting and django- tagging. When attempting a syncdb I get the following error - tagging: 'DatabaseWrapper' object has no attribute 'ops' or voting: 'DatabaseWrapper' object has no attribute 'ops&#x