>
> *db_schema_1_person.py:3(<module>)*
>

Line 3 is the line where the before_insert_person function is *defined, *not 
where it is *called*. The output does not indicate the function has 
actually been called.
 

> *another question is about validator*
> e.g.
> requires_person = IS_IN_DB(db, db.person.id, db.person._format)
>
> the above code works when put in models and controllers, why i can't put 
> it on modules, it's return an error, is there any way to put it on modules 
> using web2py way?
> *modules/test_field_constructor.py*
> requires_person = IS_IN_DB(current.db, current.db.person.id, 
> current.db.person._format)* # return an error*
>

First, in a model file, have you actually set the value of current.db? 
Second, is that line of code at the top level of the module, or within a 
function or method (only the latter will work properly)? What is the error?

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to