something else is wrong in your app, that piece of code works perfectly
fine (the fact that you're declaring 5 fields to let display only one is
quite not understandable but hey, it works nonetheless)
On Wednesday, November 7, 2012 11:32:39 AM UTC+1, Wouter Pronk wrote:
>
> I have the following code:
> form = SQLFORM.factory(
> Field('relatie_id', writable=False, readable=False),
> Field('relatie_nummer', writable=False, readable=False),
> Field('direction', writable=False, readable=False),
> Field('protocol', writable=False, readable=False),
> Field('email', requires=[IS_EMAIL(),IS_NOT_IN_DB(db,
> 'comprotocol.email')]))
>
> and this is working perfectly in version 1.99 but not in 2.2.1. I get an
> error:
>
> File
> "/home/wouter/Web2py/web2py/applications/edirelaties/controllers/default.py"
> <http://127.0.0.1:8000/admin/default/edit/edirelaties/controllers/default.py>,
> line 199, in add_protocol
> Field('relatieid', writable=False, readable=False),
> TypeError: __init__() takes exactly 1 argument (4 given
>
> What is wrong?
>
--