You'll have to be a little more specific than "doesn't work." What happens?
What have you done to diagnose the problem? Does the ajax call get made
properly? Etc.
#model
> db.define_table('content',
> Field('username'),
> Field('text', 'text'),
> Field('file', 'upload'),
> Field(
your code never writes the updated votes string. and i'm not sure that
using the "in" operator on a string like that will give you the results
that you want.
you probably want another table say votelog
db.define_table('voetlog',
Field('content_id', 'reference content'),
Field('user_id', 'r
can you give me an example code?
here's what i have but doesn't work.
#model
db.define_table('content',
Field('username'),
Field('text', 'text'),
Field('file', 'upload'),
Field('userpic'),
Field('time', 'datetime', update=request.now),
Field('userid', readable=False),
Fi
either you update the session with a counter and forbid voting if that
variable is > some limit (but as soon as the session is erased (e.g. a
clean cookie operation) the user will be able to vote again) or you build
up on request.env.remote_addr (that is the ip address requesting the page)
some
Actually, as long as you are requiring users to register and log in, you
might as well just associate each vote with a user ID -- then when a user
votes, you can just check whether that same user has already voted.
Anthony
On Wednesday, May 15, 2013 10:10:44 AM UTC-4, sasogeek wrote:
>
> the bo
5 matches
Mail list logo