Ok I've added those entries and now it looks like this

Field('last_modified', 'datetime', default=request.now,
update=request.now, writable=False, readable=False)

and gives this when I try to submit without putting a date in it in
the admin screen

flash -> enter date and time as 1963-08-28 14:30:59

It isn't auto filling the field with the datetime and it still appears
as a blank entry on the admin screen until I click it and press enter.




On Nov 16, 11:57 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>    Field(...,default=request.now,writable=False,readable=False)
>
> also add
>
>    update=request.now
>
> if you want the timestamp to change every time the record is updated.
>
> On Nov 16, 11:41 pm, David <digitalcry...@gmail.com> wrote:
>
> > Hey guys,
>
> > What is the trick to get web2py to insert the time automatically for
> > something like "last_modified" so I don't have to manually pick the
> > time when creating the records?
>
> > I've got "Field('last_modified', 'datetime', default=request.now) but
> > it still says I need to pick a time.
>
> > Thanks,
> > David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to