Can there be a default 'date created' field in auth_user?

15 views
Skip to first unread message

Brendan Hayward

unread,
Feb 8, 2015, 12:35:48 AM2/8/15
to web...@googlegroups.com
I wanted to submit a patch, but I thought I'd ask first.

I looked around for previous discussion, this was the closest to what I've done: https://groups.google.com/d/topic/web2py/M8vXPX6rExU/discussion.

It would be nice to have the date created field by default, it's one of the first things I look at when dealing with users, customers etc on any platform, not just web2py sites.

Currently I've done this in my model:

auth.settings.extra_fields['auth_user'] = [Field( 'time_stamp', type='datetime', default=request.now )]

But can this Field be declared in Auth.define_tables()? 
Reply all
Reply to author
Forward
0 new messages