Try trunk again please and let me know.
On May 17, 2:28 am, [email protected] wrote:
> Massimo,
>
> Yesterday I tested the new register() function in version 1.61.4. This
> morning I wasn't able to expose the new r941 register() function in
> version 1.61.4, so I downloaded web2py 1.62 rc2 and replaced the
> tools.py file with the one in trunk.
>
> I then created two applications one with the default auth_user table
> and another application with a custom auth_user table. The one with
> the default auth_user table works. The one with the default auth_user
> table produces the following error:
>
> Traceback (most recent call last):
> File "/Users/iannet/web2py/gluon/restricted.py", line 107, in
> restricted
> exec ccode in environment
> File "/Users/iannet/web2py/applications/mymock/controllers/
> default.py", line 53, in <module>
> File "/Users/iannet/web2py/gluon/globals.py", line 80, in <lambda>
> self._caller = lambda f: f()
> File "/Users/iannet/web2py/applications/mymock/controllers/
> default.py", line 32, in user
> return dict(form=auth())
> File "/Users/iannet/web2py/gluon/tools.py", line 430, in __call__
> return self.register()
> File "/Users/iannet/web2py/gluon/tools.py", line 721, in register
> if row[1][0]['_name']==password:
> TypeError: string indices must be integers
>
> I have no idea why a custom auth_user breaks the register() function,
> in version 1.61.4 it did not:
>
> > The new register() is working when you use the default auth_user
> > table, however, when you use a custom auth_user table it breaks. In my
> > case I have the following table. When I expose register() the second
> > password field appears after the site field.
> > auth.settings.table_user=db.define_table('auth_user',
> > SQLField('first_name', label='Voornaam', length=128, default='',
> > notnull=True),
> > SQLField('last_name', label='Achternaam', length=128, default='',
> > notnull=True),
> > SQLField('bedrijf', db.bedrijf, default='', notnull=True),
> > SQLField('username', length=128, default='', notnull=True),
> > SQLField('password', type='password', readable=False, default='',
> > notnull=True),
> > SQLField('email', length=128, default='', notnull=True),
> > SQLField('site', type='boolean', default=False, notnull=True),
> > SQLField('registration_key', length=128, writable=False,
> > readable=False, default=''),
> > migrate='auth_user.table')
>
> Kind regards,
>
> Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---