-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Downvote -1 #11
Comments
For the present, the |
It's not as easy as just adding another field, because both your upvote and downvote field will end up going through the Vote class, so when a user upvotes and you try to do: obj.upvotes.up(user) the second call destroys the first vote. I made a trivial subclass of Vote called Downvote, and made my downvotes field thusly:
which does the right thing, but now I'm running into other issues; specifically that Django can't filter on GenericForeignKeys, so code like:
doesn't work -- it generates the error: FieldError: Field 'content_object' does not generate an automatic reverse relation and therefore cannot be used for reverse querying. If it is a GenericForeignKey, consider adding a GenericRelation. This is with Django 1.8.3. |
Supported in version 2.1.4 |
Is it possible to make downvote decrement 1, instead of just removing the upvote?
So negative numbers is possible. And down voting without upvoting is possible.
The text was updated successfully, but these errors were encountered: