It is checked in the Field.__init__ but not if it is done after the
fact.

db.define_table('test',Field('name',require=something)
this will throw an error.

db.test.name.require = something
this won't throw an error.

On Nov 26, 10:13 am, Richard Vézina <[email protected]>
wrote:
> I don't think because require could be a variable name...
>
> I don't know.
>
> Richard
>
> 2010/11/26 António Ramos <[email protected]>
>
> > I got no error when i save my model.
> > It sould give some error because
> > db.database.field.require is not valid
>
> > I think.....
>
> > António
>
> > 2010/11/26 Richard Vézina <[email protected]>
>
> > And what will happen if we want to use require key word for an other
> >> purpose??
>
> >> Are you mean require or requires messages each type I write a line of
> >> code?
>
> >> May be you need a IDE (eclispe with python plugin) that will try to
> >> complete the code you are typing... It may prevent some typo.
>
> >> Richard
>
> >> 2010/11/26 António Ramos <[email protected]>
>
> >> Hello i have a model and this line
> >>> db.trabalhadores.empreiteiro.*require*=IS_IN_DB(db,'empreiteiros.id
> >>> ','%(empreiteiro)s')
>
> >>> it hapens that there is no error from web2py but when i insert a record i
> >>> got no dropdownlist for field empreiteiro.
>
> >>> After copy paste some examples i noticed that it is not require but *
> >>> requires*
> >>> Shouldn´t web2py warned me about the type error?*
> >>> *
>
> >>> I lost 15 minutes looking for the bug.
>
> >>> Best regards
> >>> António
>
>

Reply via email to