Questions tagged [django-voting]
26 questions
6
votes
2 answers
Using django and django-voting app, how can I order a queryset according to the votes of each item?
(I'm new to python and django so please bear with me for a second. I apologise if this has been answered elsewhere and couldn't find it)
Let's say I have a Link model and through the django-voting application users can vote on link instances. How…

Nicolas R
- 991
- 2
- 8
- 17
5
votes
1 answer
Django threadedcomments and voting
I'm using django-threadedcomments and django-voting in my project to achieve a Reddit-like comments voting system.
I've set everything up correctly and I'm able to successfully record votes for each threaded comment and its children, however I'm a…

twampss
- 1,287
- 2
- 12
- 13
5
votes
2 answers
How do you join two tables using Django without using raw sql?
Is is possible to programatically join two tables using Django's ORM? I have two models: Topics and Votes. On my template I have a list of topics that users can up/down vote like Reddit. Everything works as it should except for sorting the results.…

user1462141
- 252
- 2
- 4
- 14
4
votes
0 answers
Django threaded comments with up/down-voting (like Hacker News or Reddit)
I'm new to Django. I'm trying to build a discussion app in Django that, like Reddit and Hacker News, is fully threaded and sorts each comment by up/down vote.
I've been using the django-voting app, and would like to continue using it if at all…

Jake
- 809
- 1
- 8
- 18
2
votes
1 answer
How to add attribute '_meta' to an object?
I'm trying to add the django-voting app to my project. I don't know how to use it in my templates, so I'm adding a new template tags for voting up or down when an user click in buttons. I don't know if there's a well form to do it.
My problem is…

beni
- 3,019
- 5
- 35
- 55
2
votes
3 answers
How to restrict users voting on their own model
I am using django-voting as a voting application for two of my models. Those both models have fields "author".
How can I restrict a user from voting on a model that has this particular user set as it's author without modifying django-voting…

aleksandar
- 31
- 5
1
vote
1 answer
Cookies not working with an AJAX call from jQuery to Django
I have a Django site using a 5-star rating system for voting (I use django-ratings) and I would like to store the votings of the users with AJAX calls.
On the client side I have a JavaScript function sending a GET request to a URL:
$.ajax({
url:…

Alex Gonzalez
- 981
- 1
- 11
- 17
1
vote
1 answer
problem ordering by votes with django-voting
I have a model Post, and a model Vote. Vote (form django-voting) is essentially just a pointer to a Post and -1, 0, or 1.
There is also Tourn, which is a start date and an end date. A Post made between the start and end of a Tourn is submitted to…

defrex
- 15,735
- 7
- 34
- 45
1
vote
3 answers
Bug in django voting?
I am trying to retrieve the top voted items in Django. Here's the relevant line of code:
originalList = [x[0] for x in list(Vote.objects.get_top(Item, endIdx))[startIdx:]]
The indexes are for pagination purposes. When I try to load the page in a…

houbysoft
- 32,532
- 24
- 103
- 156
1
vote
1 answer
Django - How to deny the user to vote in his own objects?
I'm new to Django and having some doubts on how to do this. I've installed an APP called Django-voting, https://github.com/jezdez/django-voting/
This APP allow the user to vote on is own objects. I need to deny this but not sure on how to do it. How…

André
- 24,706
- 43
- 121
- 178
1
vote
0 answers
Django Voting: No Default Manager Error When Ordering list by Votes
I'm building a Q&A site and listing out the questions on a template. I'm using django-voting to up/down vote on each question in the list, and I want to display the questions in order of number of votes, highest to lowest.
I added Django Generic…

Chris Yin
- 761
- 1
- 11
- 23
1
vote
1 answer
URL problem w/ code from a django-voting tutorial
I'm trying to use the django-voting tutorial from this blog:
http://new.justinlilly.com/blog/2008/nov/04/django-voting-a-brief-tutorial/
to get a simple up/down voting system working on an app of mine. But just like the first commenter from that…

ahow
- 57
- 1
- 6
1
vote
1 answer
Voting with django voting
I'm having trouble registering a vote with registering a vote with django-voting: https://github.com/brosner/django-voting
I'm trying to technically upvote a comment object. Thus adding to it's score.
This is what I have so far:
Template:
0
votes
2 answers
django-voting combined with paginator: TypeError object of type 'generator' has no len()
UPDATE:
All I am trying to do is get the list of objects based on their voting score and send it to the template. If you have used django-voting before please help me figure this one out. I need a list because I pass that list to the paginator…
user201788
0
votes
1 answer
Django converting generator to list
I am using django-voting package and have been trying to get it's manager get_top() to work. I've stumbled upon one problem - it produces generator (from which actually I need to extract data to select items from database on) which seems to be a…

Ruslan
- 1,208
- 3
- 17
- 28