miratcan / qhonuskan-votes

Simple reddit like voting system without usage off GenericForeignKeys. Built for linkfloyd project.
Other
30 stars 11 forks source link

When vote count is displayed in different page the count is incorrect #19

Closed rashidalnaemi closed 11 years ago

rashidalnaemi commented 11 years ago

I have this in one page and a view:

{% voting_script %}

{% for object in submissions %}

{% vote_buttons_for object %}
{{ object.title }}
{% get_comment_count for object as numcom %} {{numcom}}

{% endfor %}


And this is in a different page in a different view {% voting_script %}

{% vote_buttons_for object %}
{{ object.title }}
{% get_comment_count for object as numcom %} {{numcom}}

The second example is always one less than the previous example. The correct vote button is highlighted but the number is incorrect. i.e if I voted up, clicking the upvote button in the second page will clear the vote instead of adding another one but the number the page loads with is wrong by -1