This is a bug. I will fix and post 1.66.1 today

On Aug 17, 10:00 pm, ionel <ionelanton...@gmail.com> wrote:
> If in form, username and password fields are empty:
>
> Traceback (most recent call last):
>   File "C:\site\web2py\gluon\restricted.py", line 178, in restricted
>     exec ccode in environment
>   File "C:/site/web2py/applications/phoenix/controllers/default.py",
> line 88, in <module>
>   File "C:\site\web2py\gluon\globals.py", line 101, in <lambda>
>     self._caller = lambda f: f()
>   File "C:/site/web2py/applications/phoenix/controllers/default.py",
> line 45, in user
>     return dict(form=auth())
>   File "C:\site\web2py\gluon\tools.py", line 477, in __call__
>     return self.login()
>   File "C:\site\web2py\gluon\tools.py", line 760, in login
>     onvalidation=onvalidation):
>   File "C:\site\web2py\gluon\html.py", line 1245, in accepts
>     status = self._traverse(status)
>   File "C:\site\web2py\gluon\html.py", line 451, in _traverse
>     newstatus = c._traverse(status) and newstatus
>   File "C:\site\web2py\gluon\html.py", line 451, in _traverse
>     newstatus = c._traverse(status) and newstatus
>   File "C:\site\web2py\gluon\html.py", line 451, in _traverse
>     newstatus = c._traverse(status) and newstatus
>   File "C:\site\web2py\gluon\html.py", line 451, in _traverse
>     newstatus = c._traverse(status) and newstatus
>   File "C:\site\web2py\gluon\html.py", line 458, in _traverse
>     newstatus = self._validate()
>   File "C:\site\web2py\gluon\html.py", line 1054, in _validate
>     (value, errors) = validator(value)
>   File "C:\site\web2py\gluon\validators.py", line 1745, in __call__
>     failures.append("Minimum length is %s", str(self.min))
> TypeError: append() takes exactly one argument (2 given)
>
> In model I have:
>
> auth_table = db.define_table(
>     auth.settings.table_user_name,
>     Field('username', length=128, default='', unique=True),
>     Field('first_name', length=128, default=''),
>     Field('last_name', length=128, default=''),
>     Field('email', length=128, default='', unique=True),
>     Field('password', 'password',
>           readable=False, label='Password'),
>     Field('registration_key', length=128, default='',
>           writable=False, readable=False),
>     migrate = True)
>
> auth_table.username.requires = [
>     IS_NOT_EMPTY(error_message=auth.messages.is_empty),
>     IS_NOT_IN_DB(db, auth_table.username)]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to