Skip to content
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

Is there an option to clear all existing votes? #53

Open
CuriousLearner opened this issue Jul 7, 2017 · 1 comment
Open

Is there an option to clear all existing votes? #53

CuriousLearner opened this issue Jul 7, 2017 · 1 comment

Comments

@CuriousLearner
Copy link

I tried reseting all the votes count in my inherited model by updating the num_vote_up, num_vote_down and vote_score.

I can iterate over all the instances via vote manager and remove the votes. But I want to avoid that.

Is there a simpler way I can clear all existing votes from the vote table as well or that is the only way and I need to do that asynchronously?

@shellfly
Copy link
Owner

shellfly commented Jul 7, 2017

No method for this now, The all method get a queryset of all votes by a user, you can use the code in this method and remove the user argument. https://github.com/shanbay/django-vote/blob/master/vote/managers.py#L147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants