Skip to content

Commit

Permalink
Fixed argument order in record_vote sample; ignoring *.pyc files in v…
Browse files Browse the repository at this point in the history
…oting directory

git-svn-id: https://django-voting.googlecode.com/svn/trunk@59 662f01ad-f42a-0410-a340-718c64ddaef4
  • Loading branch information
insin committed Aug 28, 2007
1 parent 990c9bf commit ee0221e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/overview.txt
Expand Up @@ -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::
Expand All @@ -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}

Expand Down

0 comments on commit ee0221e

Please sign in to comment.