would default=request.now work in this case?

On Friday, October 5, 2012 8:27:52 PM UTC-4, Saurabh Kumar wrote:
>
> I have a table with follwing schema:
>
> db.define_table('active_connections',
> db.Field('user','string'),
> db.Field('last_seen','datetime',default=datetime.now()),
> )
>
> I am inserting entries to this table from a web2py external python script 
> run with the following command:
> python web2py.py -S chat -M -R applications/chat/private/script.py
>
> But instead of inserting current time in table entries, it inserts the 
> same time in all entries, the time when this script was run.
> Why does this happen?
>
>
>

-- 



Reply via email to