Thanks for the input.  The site for viewing the grams are just webpages and 
votes are done from the web interface.
I wasn't thinking correctly with how to store the items in the dictionary 
and I needed to add simple dictionary with the items they have voted for. 
 So the problem is fixed.
The session way of holdding back votes seem to work for now.  We will see 
if people abuse it.  So far, I don't think there is much point in it.
BR,
Jason Brower

On Tuesday, March 4, 2014 9:39:11 AM UTC+2, Encompass solutions wrote:
>
> I was thinking of a voting system without users, but I wanted to get your 
> opinions on what would be the best practice with this.
> In melodigram.com I have grams that each have their one unique id's and 
> urls.  They will be voted on by anyone.
> I imagine something like this:
> --------------------------------
> gram_id = request.args(0)
> if session.__dict__[gram_id]:
>     return dict(success = False)
> session.__dict__[gram_id] = True
> return dict(success = success)
> --------------------------------
> What do you think?  Good idea?
> BR,
> Jason Brower
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to