Thanks. I switched to it. Regards On Fri, Feb 21, 2020, 06:58 Massimo Di Pierro <massimo.dipie...@gmail.com> wrote:
> in py4web request is the bottlepy request. > https://bottlepy.org/docs/dev/api.html#the-request-object > There is no now. > > You can use datetime.timetime.now() > > On Tuesday, 18 February 2020 08:34:51 UTC-8, Maurice Waka wrote: >> >> BUT >> Now I get this: >> >> Field('modified_on', 'datetime', default=request.now, update=request.now), >> File "/usr/local/lib/python3.6/dist-packages/bottle.py", line 1400, in >> __getattr__ >> raise AttributeError('Attribute %r not defined.' % name) >> AttributeError: Attribute 'now' not defined. >> >> >> On Tuesday, February 18, 2020 at 7:13:27 PM UTC+3, Maurice Waka wrote: >>> >>> Thanks @Lovdie >>> >>> got >>> >>> >>> from py4web import request,.... >>> >>> On Tuesday, February 18, 2020 at 6:58:10 PM UTC+3, Maurice Waka wrote: >>>> >>>> In py4web, I cant use this syntax: >>>> default = request.now >>>> >>>> >>>> Error: >>>> >>>> Field('modified_on', 'datetime', default=request.now),# >>>> update=request.now), >>>> NameError: name 'request' is not defined >>>> >>>> -- > 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 web2py+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/ebc49b2d-ed20-4fd9-9aa0-ee94a7f4cfde%40googlegroups.com > <https://groups.google.com/d/msgid/web2py/ebc49b2d-ed20-4fd9-9aa0-ee94a7f4cfde%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CAAcHJF-T%3DzbWLD4-6_CqdwZpk%3DSfVK4OtYHhHKvYxho9sEs0yg%40mail.gmail.com.