auth.signature modified_on, created_on using utc time

68 views
Skip to first unread message

funm...@gmail.com

unread,
May 21, 2013, 10:48:28 PM5/21/13
to web...@googlegroups.com
hi all,

I like to use table inheritance with auth.signature in my model. I see that it is working, but it doesn't use utc time. So i added my own field.

1) Is this a recommended approach or there are other ways to modify auth.signature?

db.define_table('demo_detail',
   Field('prototype_id', 'reference prototype',label='Prototype Title'),
   Field('info','text'),
   Field('storyboard', 'upload', label='Storyboard'),
   Field('modified_on', 'datetime', update=request.utcnow, writable = False),
   Field('created_on', 'datetime', update=request.utcnow, writable = False),
   auth.signature
)

2) I can't seem to see the auth.signature table in my appadmin. Where should i modify it if needed?
db.auth_userNew Record
db.auth_groupNew Record
db.auth_membershipNew Record
db.auth_permissionNew Record
db.auth_eventNew Record
db.auth_cas


Thank for your help.


Massimo Di Pierro

unread,
May 22, 2013, 9:48:13 AM5/22/13
to web...@googlegroups.com
auth.signature is not a table. It is a list of fields which you are including in the demo_detail table.

Funmanhk

unread,
May 22, 2013, 8:41:56 PM5/22/13
to web...@googlegroups.com
Massimo,

Thanks for the correction. 

I hope to see if it saves me copy and paste the modified_on/created_on fields in another few tables. 

Is auth.signature defined somewhere? Sorry that it maybe another silly question. My below model below does give me what I want to use utc. 

Regards,
Funman

db.define_table('demo_detail',
   Field('prototype_id', 'reference prototype',label='Prototype Title'),
   Field('info','text'),
   Field('storyboard', 'upload', label='Storyboard'),
   Field('modified_on', 'datetime', update=request.utcnow, writable = False),
   Field('created_on', 'datetime', update=request.utcnow, writable = False),
   auth.signature
)


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/oQpOEHW7_7A/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages