Ah ok, I had put it right after. Den söndagen den 12:e maj 2013 kl. 16:32:06 UTC+2 skrev Niphlod: > > where did you put this snippet ? make sure it's before > > auth.define_tables() > > On Sunday, May 12, 2013 4:05:27 PM UTC+2, Robin Manoli wrote: >> >> 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). The fields created, changed, and avatar were NOT even >> added to the database table. >> >> 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.