Thanks again Anthony!

It's a really beautiful solution, but it resulted again in a NULL value. 
However, it worked with the tweak to manually set the date to 
request.utcnow:




*# fix appadmin's inability to handle dates correctly (because of ignoring 
writable)if request.controller == 'appadmin' and 'updated_at' in 
request.post_vars:    request.post_vars.updated_at = request.utcnow*


Den måndag 16 november 2015 kl. 16:19:46 UTC+1 skrev Anthony:
>
> On Monday, November 16, 2015 at 9:43:09 AM UTC-5, Robin Manoli wrote:
>>
>> Thanks for your replies guys!
>>
>> Anthony, when I deleted the update value, it stored a NULL value instead. 
>> Does it mean I need to enter it manually? Or is there an easy fix to this?
>>
>
> One alternative to manual entry might be adding something like this in the 
> model:
>
> if request.controller == 'appadmin' and 'updated_at' in request.post_vars:
>     del request.post_vars.updated_at
>
> That will remove the "updated_at" value from the form submission (but only 
> when using appadmin), which should then cause the update attribute to take 
> effect.
>
> 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