Tried Denes's suggestion, and resulrs are perect! Thanks Denes!
did this:
id=db.local_user.insert(dateTime=datetime.now())
rec=db(db.local_user.id==id)
for key,value in localUserDict.items():
if key in db.local_user.fields:rec.update(**{key:value})
db.c
Will this day ever end!? ;)
Thanks David, will have a look at that too! :)
Thanks,
Mart :)
On Jul 11, 10:50 am, "David J." wrote:
> You may want to look at the _filter_fields
>
> Look at web2py slices; this way you can pass a dict and it updates with
> the relevant fields/
>
> On 7/11/11 10:38
You may want to look at the _filter_fields
Look at web2py slices; this way you can pass a dict and it updates with
the relevant fields/
On 7/11/11 10:38 AM, mart wrote:
Hi Denes,
Thanks for the great explanation! now, its making sense to me!!
I'll apply the changes below
Thanks :)
Mart :)
Hi Denes,
Thanks for the great explanation! now, its making sense to me!!
I'll apply the changes below
Thanks :)
Mart :)
On Jul 11, 9:34 am, DenesL wrote:
> Hi Mart,
>
> to be able to use the key in the update you have to pass it in a dict.
> I would do:
>
> id=db.local_user.insert(dateTime=d
Hi Mart,
to be able to use the key in the update you have to pass it in a dict.
I would do:
id=db.local_user.insert(dateTime=datetime.now())
# you seem to be updating one rec only
rec = db(db.local_user.id==id)
for key,value in localUserDict.items():
if key in db.local_user.fields:
rec.upda
5 matches
Mail list logo