The event is tied to the submit, in this case, it's basically a "test" 
question.  When the correct answer is submitted by the user (based upon a 
check of the database) then their row in the table is updated as having 
been correct.


On Sunday, 19 May 2013 15:39:05 UTC-4, Niphlod wrote:
>
> it depends.... if this "event" is bound to the user pressing the submit on 
> a form, maybe the best place is the onvalidation callback of the accepts() 
> or process() method
>
>
> http://web2py.com/books/default/chapter/29/07?search=onvalidation#onvalidation
>
> On Sunday, May 19, 2013 8:37:32 PM UTC+2, Chris Teodorski wrote:
>>
>> I have a form, that users submit -- when they submit the form, I want to 
>> validate it against valid data in the database, but I'm not sure where that 
>> query belongs.  I was trying to put it in a controller but it's not working 
>> like I expected.  Where is the right place to put these database calls, 
>> both queries and updates?
>>
>> Thanks for the help.
>>
>> Chris
>>
>>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to