I suppose your used to it by now. :D
This works... except for the validators... they aren't stoping me from
entering more than one student_name
from datetime import datetime, date, time
now = datetime.utcnow()
today = date.today()
db = SQLDB('sqlite://database.db')
db.define_table('student',
SQLField('student_name', 'string'),
SQLField('certificate_number', 'integer'),
SQLField('security_number', 'string'),
SQLField('grade_point_average', 'double'),
SQLField('thesis_name', 'string'),
SQLField('thesis_grade', 'integer'))
db.student.student_name.requires = IS_NOT_IN_DB(db,
"student.student_name")
db.student.certificate_number.requires = IS_NOT_IN_DB(db,
"student.certificate_number")
db.student.thesis_grade.requires = IS_IN_SET(range(1,6))
db.student.grade_point_average.requires = IS_FLOAT_IN_RANGE(1,5)
db.student.student_name.requires = IS_NOT_EMPTY()
db.student.certificate_number.requires = IS_NOT_EMPTY()
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---