django-vote icon indicating copy to clipboard operation
django-vote copied to clipboard

Is there an option to clear all existing votes?

Open CuriousLearner opened this issue 8 years ago • 1 comments

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?

CuriousLearner avatar Jul 07 '17 05:07 CuriousLearner

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

shellfly avatar Jul 07 '17 13:07 shellfly