Hello!
<type 'exceptions.AttributeError'> 'str' object has no attribute 'year'
In db.py
from gluon.tools import prettydate
sometable = db.define_table('sometable',
Field('someinteger', 'integer', default=-1),
Field('updated', 'datetime')
)
sometable.updated.represent = lambda value,row:prettydate(value,T)
sometable.insert(someinteger=1,updated=request.now)
In default.py
def index():
#### with this code we get - error <type
'exceptions.AttributeError'>('str' object has no attribute 'year')
message = SQLFORM.grid(db.sometable)
## this code work perfect
##message = db(db.sometable).select()
return dict(message=message)
...
--
---
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/groups/opt_out.