Permalink
Browse files

Fixed argument order in record_vote sample; ignoring *.pyc files in v…

…oting directory

git-svn-id: https://django-voting.googlecode.com/svn/trunk@59 662f01ad-f42a-0410-a340-718c64ddaef4
  • Loading branch information...
1 parent 990c9bf commit ee0221e6e1ae045e3f3b4a2f6a9cad0ac78984f7 @insin insin committed Aug 28, 2007
Showing with 3 additions and 3 deletions.
  1. +3 −3 docs/overview.txt
View
6 docs/overview.txt
@@ -124,7 +124,7 @@ Votes are recorded using the ``record_vote`` helper function::
>>> from voting.models import Vote
>>> user = User.objects.get(pk=1)
>>> widget = Widget.objects.get(pk=1)
- >>> Vote.objects.record_vote(user, widget, +1)
+ >>> Vote.objects.record_vote(widget, user, +1)
The score for an object can be retrieved using the ``get_score``
helper function::
@@ -135,10 +135,10 @@ helper function::
If the same user makes another vote on the same object, their vote
is either modified or deleted, as appropriate::
- >>> Vote.objects.record_vote(user, widget, -1)
+ >>> Vote.objects.record_vote(widget, user, -1)
>>> Vote.objects.get_score(widget)
{'score': -1, 'num_votes': 1}
- >>> Vote.objects.record_vote(user, widget, 0)
+ >>> Vote.objects.record_vote(widget, user, 0)
>>> Vote.objects.get_score(widget)
{'score': 0, 'num_votes': 0}

0 comments on commit ee0221e

Please sign in to comment.