Re: [web2py] Re: Renaming fields of auth tables

2010-12-30 Thread Marin Pranjic
Clear. :) On Thu, Dec 30, 2010 at 10:20 PM, Lisandro wrote: > Well, I will try to explain myself better, because I'm from Argentina > and my english is a mix between what I learned and what I hear in the > movies :) > > Basically, you've explained it for me. That's exactly what I'm going > to do.

[web2py] Re: Renaming fields of auth tables

2010-12-30 Thread Lisandro
Well, I will try to explain myself better, because I'm from Argentina and my english is a mix between what I learned and what I hear in the movies :) Basically, you've explained it for me. That's exactly what I'm going to do. But, instead of "auth.settings.register_onvalidation.append(...", I'm go

Re: [web2py] Re: Renaming fields of auth tables

2010-12-30 Thread Marin Pranjic
It's all in the book :) Not sure what do you want to set by trigger. First solution is to leave first_name and last_name empty. Just don't use them, don't set them... ignore. Second is to update those fields when your custom fields are updated. Thats what i do. I added field 'username'. Field 'last

[web2py] Re: Renaming fields of auth tables

2010-12-30 Thread Lisandro
Thanks for that tip! I thought something similar. I said "well, I just have to hide those fields, add the fields that I want, and then set the values for the hidden fields with a database trigger". As I'm using postgresql, I have lot of restrictions at database level, not at the DAL level (because

Re: [web2py] Re: Renaming fields of auth tables

2010-12-29 Thread Marin Pranjic
You can "ignore" current first_name or last_name (or both) fields, and add other fields, as you like. Add custom fields, and for current (first_name, last_name) set readable = False and writable = False and just don't use them. More about customizing: http://www.web2py.com/book/default/chapter/08

[web2py] Re: Renaming fields of auth tables

2010-12-29 Thread Lisandro
Thanks for the quickly answer. Though, I really need to rename the field, this is for keep backward compatibility and standards with an existing system. On 29 dic, 11:03, Marin Pranjic wrote: > Hi, > you can use *label* like described > here:http://www.mail-archive.com/web2py@googlegroups.com/m