def admin():
    grid = SQLFORM.grid(db.auth_user, onupdate = messenger)
    return locals()

def messenger():
    mail.send(to="email", subject="welcome to icop", message="bla bla")

its not working as expected. i.e. on updating the records in the grid, no 
message is sent to the user. rather it says that messenger doesnt accept 
any arguments, but 1 was given. 
HELP.

On Thursday, October 4, 2012 9:43:32 PM UTC+1, Niphlod wrote:
>
> at least post whatever code you're trying to run without success :P
>
> On Thursday, October 4, 2012 10:03:10 PM UTC+2, Pystar wrote:
>>
>> it didnt work. I need help
>>
>> On Thursday, October 4, 2012 8:29:51 PM UTC+1, Pystar wrote:
>>>
>>> From the book, I can see this SQLFORM.grid(onupdate, oncreate, 
>>> ondelete), I should believe that I can pass a function to the onupdate 
>>> argument that will call a function to send mails whenever a record is 
>>> updated. I believe this is correct without testing if it is now. Will do so 
>>> and return with findings
>>>
>>> On Thursday, October 4, 2012 8:08:06 PM UTC+1, Pystar wrote:
>>>>
>>>> How do I customize SQLFORM.grid() to send a mail to users in a db 
>>>> whenever data is updated from the grid? tips, hints?
>>>>
>>>>

-- 



Reply via email to