Hello,
i got an exception when using the sample code for storring the sessions in
a database. I used the sample code from
http://www.web2py.com/book/default/chapter/04#session
Model:
...
db.define_table('web2py_session',
Field('locked', 'boolean', default=False),
Field('client_ip'),
Field('created_datetime', 'datetime', default=now),
Field('modified_datetime', 'datetime'),
Field('unique_key'),
Field('session_data', 'text'))
...
Exception:
Traceback (most recent call last):
File "/home/geht/euch/nichts/an/web2py/gluon/restricted.py", line 192, in
restricted
exec ccode in environment
File
"/home/geht/euch/nichts/an/web2py/applications/moepse/models/default.py", line
30, in <module>
Field('created_datetime', 'datetime', default=now),
NameError: name 'now' is not defined
Kind Regards,
Sciurus vulgaris