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 required=True doesn't set "not null" to the field). So, I will keep the auth_user table as it is, and add the fields with other names. The only "problem" with this is that it isn't very elegant (values repeated in the database). But it will work.
Thanks for the help Marin. On 29 dic, 18:39, Marin Pranjic <[email protected]> wrote: > 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#Customizing-Auth > > hope this one helps > > Marin > > On Wed, Dec 29, 2010 at 9:02 PM, Lisandro <[email protected]>wrote:> > 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 <[email protected]> wrote: > > > Hi, > > > you can use *label* like described here: > >http://www.mail-archive.com/[email protected]/msg28123.html > > > > but you can still reference it only by its name ['first_name', > > 'last_name']. > > > > On Wed, Dec 29, 2010 at 2:44 PM, Lisandro <[email protected] > > >wrote: > > > > > Hi everyone. > > > > I'm customizing my authentication and access control system (following > > > > the instructions from the web2py website and some examples of this > > > > group). > > > > > I've renamed my auth_user table with the following: > > > > auth.settings.table_user_name = 'ciudadanos' > > > > > Then I renamed the fields "first_name" and "last_name", defining my > > > > custom table. But when I try to insert a record (from database > > > > administration interface), I receive an error. > > > > > ¿Is it possible to rename fields of auth_user table without having to > > > > change web2py source code? > > > > If it isn't possible, ¿is there a way to set an "alias" for a field, > > > > so it can be referenced by its name or by its alias? > > > > > Thanks in advance. > >

