this feels like checkmate.  I did get the 'is not callable' error as you 
anticipated.  Is there an avenue that I don't see?  At this point I am 
resigned to running the code a bunch of times and creating a bunch of 
lists; then assign one to each user; any advice before I go down that road?



On Monday, May 22, 2017 at 8:10:28 AM UTC-7, Anthony wrote:
>
> On Sunday, May 21, 2017 at 4:58:24 PM UTC-4, [email protected] 
> <javascript:> wrote:
>>
>> fun = database
>> zip = table name
>> inform = Field name
>>    this enters data into the database but I would prefer it run only once 
>> at registration.   
>>     fun.zipdip.insert(infom=result)
>>
>> An interesting behavior is when I run the above I get 20 dates in the db. 
>>  But when I run 
>> --auth.settings.register_onaccept.append(fun.zipdip.insert(infom=result))-- 
>> I end up with quite a few more, about 60, which is preferable.
>>
>
> auth.settings.register_onaccept must be a list of one or more *functions*, 
> each of which will be called upon registration, with the registration 
> SQLFORM object passed in as the one and only argument.
>
> Your current code instead actually does a database insert when setting up 
> auth.settings.register_onaccept. So, every time the model file is executed 
> (presumably on every request), you will get a database insert. Also, 
> because the value added to the register_onaccept list is not actually a 
> callable, you should be getting an error upon registration.
>
> Anthony
>

-- 
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