In db.py I defined a table:

db.define_table('Node',
    Field('createdOn',type='datetime',writable=False,readable=False),
    migrate=False)

db.Node.createdOn.default=request.now
db.Node.createdOn.requires=IS_DATETIME(str(T('%Y-%m-%d %H:%M:%S')))

Now, when I add this validator:

db.Node.createdOn.represent = lambda v: v.strftime('%d/%m/%Y')

... and save the file I get a failed to compile file error because of 
invalid syntax in this line.
What is the correct syntax?

Kind regards,

Annet.

Reply via email to