of course! stupid me... I completely forgot to check the definitions.
thanks for the answer Massimo! i've been coding the whole day so i'll
chalk this up to been tired... ;)

regarding the validator, it's a simple one which attempts to resolve a
FQDN which I'm using to insert as a record. the FQDN needs to resolve
before being added to the DB. if you think it's a worthwhile
validator, I can submit it in for inclusion.

i'll move it over into model/validators.py so long...

cheers!

On Jul 1, 11:25 pm, mdipierro <[email protected]> wrote:
> Probably because it is not listed in the __all__=[....] at the top of
> the file and therefore it is not imported in the scope.
>
> Anyway, you should put your custom validator in a model file or in a
> module file (and import the latter). It is not a good to edit the
> system files (validators.py) unless you plan to submit for inclusion
> in web2py.
>
> On 1 Lug, 16:09, Jacques van der Merwe <[email protected]> wrote:
>
> > greetings all,
>
> > i've just written a custom validator which has been placed into gluon/
> > validators.py. the strange thing is that i'm getting an undefined
> > error when trying to call it from db.py. i can call any of the other
> > validators defined in validators.py and so i'm a little boggled as to
> > why this is happening.
>
> > the new validator works and follows the structure of the others, in
> > case anyone is going to ask me that. :)
>
> > anyone have any ideas?
>
> > cheers!

Reply via email to