I don't see any ticket about that on google code... I will create it if Massimo tell me.
In the mean time I will try the trunk. Richard On Tue, May 15, 2012 at 11:40 AM, Jim Steil <[email protected]> wrote: > Yes, that is a situation I ran into some time ago. In the past even if > you used a custom ID column you could still refer to the column with .id. > That went away in trunk some time ago. I really wish it were back, it made > some other things very easy. I tried working with a slice just last week > that didn't work for me any more because I use custom ID field names. > > -Jim > > > On 5/15/2012 10:29 AM, Richard Vézina wrote: > > Ok, I think I had problem with model definition : 'db.auth...' : foreign > key were quoted... I have this issue since a long time, If I was removing > quote I didn't have proper representation... > > Fixed now... > > But now it seems that I have problem with the use of id in case were I > have define a custom id. Ex: > > db.define_table('table1_tab1', > Field('tab1_id','id'), > ... > > > In the pass I was able to call id or tab1_id : > > 1.99.4 > In [1]: db.table1_tab1(1).id > Out[1]: 1 > > In [2]: db.table1_tab1(1).tab1_id > Out[2]: 1 > > > 1.99.7 > In [1]: db.table1_tab1(1).id > KeyError: 'id' > > In [2]: db.table1_tab1(1).tab1_id > Out[2]: 1 > > Is it something not anymore possible or this bug have been introduce > recently? > > Richard > > On Tue, May 15, 2012 at 10:52 AM, Richard Vézina < > [email protected]> wrote: > >> Wait... >> >> >> On Tue, May 15, 2012 at 10:37 AM, Richard Vézina < >> [email protected]> wrote: >> >>> Ok if I copy my custom auth models into a new app it keeps loading the >>> page for ever and don't create the table at postgres level. >>> >>> Richard >>> >>> >>> On Tue, May 15, 2012 at 10:19 AM, Richard Vézina < >>> [email protected]> wrote: >>> >>>> Yes I try a new app without defining auth models myself, just changed >>>> the connection string for postgres and it works. >>>> >>>> I don't have the typo in my code, it maybe happen when copy/paste the >>>> code somehow. >>>> >>>> I just add this : auth=Auth(db, *hmac_key=Auth.get_or_create_key()*) >>>> >>>> No change. >>>> >>>> Richard >>>> >>>> >>>> On Tue, May 15, 2012 at 10:04 AM, Massimo Di Pierro < >>>> [email protected]> wrote: >>>> >>>>> There is a typo in your code: >>>>> >>>>> uth.settings.hmac_key='sha512:8e95c268-cc31-4119-890d-a5790d3e05d3' >>>>> >>>>> should be >>>>> >>>>> auth.settings.hmac_key='sha512:8e95c268-cc31-4119-890d-a5790d3e05d3' >>>>> >>>>> although this is probably not the cause for your problems. Does it >>>>> work if you use sqlite? Does it work if you use postgresql with a new >>>>> database? >>>>> >>>>> On Monday, 14 May 2012 15:53:40 UTC-5, Richard wrote: >>>>>> >>>>>> Hello, >>>>>> >>>>>> I try one more time to upgrade to 1.99.7 today without succes. But >>>>>> now I know what append... It works fine, until I try to logon with a >>>>>> user... >>>>>> >>>>>> In shell it works fine, can access to any tables... >>>>>> >>>>>> Is there change to the logon process has been changed between >>>>>> 1.99.4 and 1.99.7? >>>>>> >>>>>> Thanks >>>>>> >>>>>> Richard >>>>>> >>>>>> On Thu, Mar 8, 2012 at 12:54 PM, Richard Vézina < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Ping! >>>>>>> >>>>>>> Richard >>>>>>> >>>>>>> >>>>>>> On Wed, Mar 7, 2012 at 10:48 AM, Richard Vézina < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> I use to download source package and make my update by my own >>>>>>>> (manually). I don't use the update feature. >>>>>>>> >>>>>>>> Here most of my db.py that contain db connection and all related >>>>>>>> auth configuration : >>>>>>>> >>>>>>>> db=DAL('postgres://USER:[email protected]:5432/DATABASE', \ >>>>>>>> migrate_enabled=False) >>>>>>>> >>>>>>>> >>>>>>>> from gluon.tools import * >>>>>>>> auth=Auth(globals(),db) # authentication/authorization >>>>>>>> >>>>>>>> auth_table = db.define_table( >>>>>>>> auth.settings.table_user_name, >>>>>>>> Field('first_name', length=128, default=None, >>>>>>>> required=True, >>>>>>>> notnull=True, >>>>>>>> requires = >>>>>>>> IS_NOT_EMPTY(error_message=T(auth.messages.is_empty)), >>>>>>>> ), >>>>>>>> Field('last_name', length=128, default=None, >>>>>>>> requires = >>>>>>>> IS_NOT_EMPTY(error_message=T(auth.messages.is_empty)), >>>>>>>> ), >>>>>>>> Field('email', length=128, default=None, unique=True, >>>>>>>> label=T('Email'), >>>>>>>> requires = >>>>>>>> [IS_EMAIL(error_message=T(auth.messages.invalid_email)), >>>>>>>> IS_NOT_IN_DB(db, 'auth_user.email')], >>>>>>>> ), >>>>>>>> Field('password', 'password', length=256, >>>>>>>> readable=False, label=T('Password'), >>>>>>>> required=True, >>>>>>>> notnull=True, >>>>>>>> requires = >>>>>>>> CRYPT(min_length=auth.settings.password_min_length, >>>>>>>> error_message=T('too short')) >>>>>>>> ), >>>>>>>> Field('registration_key', length=128, default=None, >>>>>>>> writable=False, readable=False), >>>>>>>> Field('reset_password_key', length=512, >>>>>>>> writable=False, readable=False, default=None >>>>>>>> ), >>>>>>>> Field('initials','string',length=5), >>>>>>>> migrate=False, >>>>>>>> format='%(first_name)s %(last_name)s (%(id)s)') >>>>>>>> >>>>>>>> auth.settings.table_user = auth_table # no idea what this line >>>>>>>> do... >>>>>>>> >>>>>>>> auth_table = db.define_table( >>>>>>>> auth.settings.table_event_name, >>>>>>>> Field('time_stamp','datetime',default=request.now), >>>>>>>> Field('client_ip','string',length=512,default=request.client), >>>>>>>> Field('user_id',db.auth_user), >>>>>>>> Field('origin','string',length=512), >>>>>>>> Field('description','text'), >>>>>>>> migrate=False,) >>>>>>>> >>>>>>>> auth_table = db.define_table( >>>>>>>> auth.settings.table_group_name, >>>>>>>> Field('role','string',length=512), >>>>>>>> Field('description','text'), >>>>>>>> migrate=False, >>>>>>>> format='%(role)s (%(id)s)') >>>>>>>> >>>>>>>> auth_table = db.define_table( >>>>>>>> auth.settings.table_membership_name, >>>>>>>> Field('user_id','db.auth_user'), >>>>>>>> Field('group_id','db.auth_group'), >>>>>>>> migrate=False,) >>>>>>>> >>>>>>>> >>>>>>>> db.auth_membership.user_id.requires=IS_IN_DB(db,'auth_user.id','%(first_name)s >>>>>>>> %(last_name)s (%(id)s)') >>>>>>>> db.auth_membership.group_id.requires=IS_IN_DB(db,'auth_group.id','%(role)s-%(description)s >>>>>>>> (%(id)s)') >>>>>>>> >>>>>>>> db.auth_membership.user_id.represent=\ >>>>>>>> lambda value: (value!=None and "%(first_name)s %(last_name)s >>>>>>>> (%(id)s)" %db.auth_user[value]) or 'None' >>>>>>>> db.auth_membership.group_id.represent=\ >>>>>>>> lambda value: (value!=None and "%(role)s (%(id)s)" >>>>>>>> %db.auth_group[value]) or 'None' >>>>>>>> >>>>>>>> db.define_table('auth_group_allowed', >>>>>>>> Field('id','id'), >>>>>>>> Field('user_id','db.auth_user'), >>>>>>>> Field('group_id','db.auth_group'), >>>>>>>> Field('active_gr','boolean'), >>>>>>>> migrate=False, >>>>>>>> sequence_name='auth_group_allowed_id_seq') >>>>>>>> >>>>>>>> >>>>>>>> db.auth_group_allowed.user_id.requires=IS_IN_DB(db,'auth_user.id','%(first_name)s >>>>>>>> %(last_name)s (%(id)s)') >>>>>>>> db.auth_group_allowed.group_id.requires=IS_IN_DB(db,'auth_group.id','%(role)s >>>>>>>> (%(id)s)') >>>>>>>> >>>>>>>> db.auth_group_allowed.user_id.represent=\ >>>>>>>> lambda value: (value!=None and "%(first_name)s %(last_name)s >>>>>>>> (%(id)s)" %db.auth_user[value]) or 'None' >>>>>>>> db.auth_group_allowed.group_id.represent=\ >>>>>>>> lambda value: (value!=None and "%(role)s (%(id)s)" >>>>>>>> %db.auth_group[value]) or 'None' >>>>>>>> >>>>>>>> auth_table = db.define_table( >>>>>>>> auth.settings.table_permission_name, >>>>>>>> Field('group_id','db.auth_group'), >>>>>>>> Field('name','string',length=512), >>>>>>>> Field('table_name','string',length=512), >>>>>>>> Field('record_id','integer'), >>>>>>>> migrate=False,) >>>>>>>> >>>>>>>> db.auth_permission.group_id.requires=\ >>>>>>>> IS_IN_DB(db,'auth_group.id','%(role)s (%(id)s)') >>>>>>>> >>>>>>>> db.auth_permission.group_id.represent=\ >>>>>>>> lambda id: "%(role)s (%(id)s)" %db.auth_group[id] >>>>>>>> >>>>>>>> auth_table = db.define_table( >>>>>>>> auth.settings.table_cas_name, >>>>>>>> Field('user_id','integer'), >>>>>>>> Field('created_on','datetime'), >>>>>>>> Field('url','string',length=512), >>>>>>>> Field('uuid','string',length=512), >>>>>>>> migrate=False,) >>>>>>>> >>>>>>>> crud=Crud(globals(),db) # for CRUD helpers using auth >>>>>>>> service=Service(globals()) # for json, xml, jsonrpc, >>>>>>>> xmlrpc, amfrpc >>>>>>>> >>>>>>>> crud.settings.auth=auth >>>>>>>> >>>>>>>> >>>>>>>> uth.settings.hmac_key='sha512:8e95c268-cc31-4119-890d-a5790d3e05d3' >>>>>>>> auth.define_tables() # creates all needed tables >>>>>>>> auth.settings.actions_disabled.append('profile') # prohibit users >>>>>>>> to modify their profile >>>>>>>> auth.settings.actions_disabled.append('register') >>>>>>>> >>>>>>>> Thanks >>>>>>>> >>>>>>>> Richard >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Mar 7, 2012 at 10:24 AM, pbreit <[email protected]>wrote: >>>>>>>> >>>>>>>>> Are you able to upgrade to most recent version of Web2py? We might >>>>>>>>> need to see more of your model code that specifies the DB and auth. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>> >>> >> >

