On Jan 17, 5:11 pm, "Brandon Wirtz" <[email protected]> wrote:
> Authenticate the user, store their vote, if they vote a second time it
> changes their vote. Very easy.
I don't understand. I authenticate user with
user = users.get_current_user()
if user:
greeting = ("%s (<a href='%s'>sign out</a>)" %
(user.nickname(), users.create_logout_url(self.request.uri)))
so a visitor can vote only if authenticated.
Then I store the vote:
item.vote +=1
item.put()
for that article.
But I don't store that the user voted for that article; the way it is
now the user can vote on the same article again.
Can you explain a bit more what you mean?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" 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/google-appengine?hl=en.