On Fri, Nov 7, 2008 at 1:41 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> I may need to look a the model. I think something is wrong in calling
> a validator.
>
> Massimo

This is what I have in db.py

from applications.plugin_t2.modules.t2 import T2
t2=T2(request,response,session,cache,T,db,all_in_db=True)

db.define_table("student",
    SQLField('student_id',db.t2_person),
    SQLField("last_name","string",length=30,default=""),
    SQLField("first_name","string",length=30,default=""),
    SQLField("middle_name","string",length=32,default=""),
    SQLField("preferred_name","string",length=30,default=""),
    
SQLField("anumber","string",length=9,default="A0",requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'anumber')]),
    
SQLField("email","string",length=32,default="",requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'email')]),

more fields....



db.student.student_id.default=t2.person_id

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to