Ok, really last post...
There's a problem with my code, voter.id is not right, voter.voter_id
is correct.
def alreadyvoted(post, voterid):
voters = post.vote_set.all()
print "len(voters)", len(voters)
for voter in voters:
print "voter:", post, voter.id, voterid
if voter.voter_id == voterid:
return True
return False
Cheers,
Tone
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---