I was trying on a pretty much empty copy of a welcome app to create my own 
extra fields. Mainly I want to keep track of when a user registers and 
changes their profile, as well as keeping an avatar image. My code was 
working when creating a separate test table, but not when adding the fields 
using the extra fields method.

I did see in some other posts that I need to add some code for the avatar 
field to show up, but the created and changed fields should add the data 
automatically, regardless of the user's input (as long as the form is 
correctly filled in).

auth.settings.extra_fields['auth_user'] = [
    Field('created', 'datetime', default=request.now, writable=False, 
readable=False ),
    Field('changed', 'datetime', update=request.now, writable=False, 
readable=False ),
    Field('avatar', 'upload', length=128 ),
    ]

-- 

--- 
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.


Reply via email to