Yes, Is supposed that "boolean" is a type, even describe as it in comments at db.py file.
Regards, Oscar. On 3 nov, 11:52, "Yarko T" <[EMAIL PROTECTED]> wrote: > Oscar - > Are you asking why "booelan" is an unknown type? > > *grin* > > Kind regards, > Yarko > > On Sun, Nov 2, 2008 at 9:32 AM, Oscar <[EMAIL PROTECTED]> wrote: > > > I have define my table as: > > > db.define_table('t2_person', > > db.Field('name'), > > db.Field('email'), > > db.Field('nickname'), > > db.Field('registration_key','string'), > > db.Field('password','password'), > > db.Field('created_by_ip'), > > db.Field('created_on','datetime'), > > db.Field('address','text'), > > db.Field('phone1'), > > db.Field('ext1'), > > db.Field('phone2'), > > db.Field('ext2'), > > db.Field('celullar'), > > db.Field('state'), > > db.Field('zip_code'), > > db.Field('country'), > > db.Field('messages','booelan')) > > > Then I getting the following error: > > > Error traceback > > > 1. > > 2. > > 3. > > 4. > > 5. > > 6. > > 7. > > 8. > > 9. > > > Traceback (most recent call last): > > File "/Users/ra/fuentes/web2py/gluon/restricted.py", line 62, in > > restricted > > exec ccode in environment > > File "/Users/ra/fuentes/web2py/applications/diamante/models/db.py", > > line 52, in <module> > > db.Field('messages','booelan')) > > File "/Users/ra/fuentes/web2py/gluon/sql.py", line 500, in > > define_table > > raise e > > SyntaxError: SQLField: unkown field type > > > Why boolean type is returning an error? > > > Regards, > > > Taguapire. > > > On 3 nov, 10:14, Oscar <[EMAIL PROTECTED]> wrote: > > > No problem! > > > > I already did it! > > > > Thanks! > > > > On 3 nov, 10:01, Oscar <[EMAIL PROTECTED]> wrote: > > > > > How I can get all functioality from this table, I mean, the UUID added > > > > automatically to the registry key field and other stuff? > > > > > Regards, > > > > > Oscar. > > > > > On 3 nov, 00:30, mdipierro <[EMAIL PROTECTED]> wrote: > > > > > > Normally you can do > > > > > > db.define_table('base_table',SQLField('myfield')) > > > > > db.define_table('derived_table',db.base_table,SQLField('otherfield')) > > > > > > (both base_table and derived_table are created) > > > > > > or > > > > > > from gluon.sql import SQLTable > > > > > base_table=SQLTable('base_table',SQLField('myfield')) > > > > > db.define_table('derived_table',base_table,SQLField('otherfield')) > > > > > > (only derived_table is created) > > > > > > In the case T2 things are different because you want to modify the > > > > > structure of a table used by T2. > > > > > You can do it. > > > > > All you need to do is define the table before you instantiate the T2 > > > > > object. Something like this: > > > > > > db.define_table('t2_person', > > > > > db.Field('name'), > > > > > db.Field('email'), > > > > > db.Field('registration_key'), > > > > > db.Field('password','password'), > > > > > db.Field('created_by_ip'), > > > > > db.Field('created_on','datetime')) > > > > > db.t2_person.name.requires=IS_NOT_EMPTY() > > > db.t2_person.email.requires=[IS_EMAIL(),IS_NOT_IN_DB(db,'t2_person.email')] > > > > > db.t2_person.password.requires=[IS_NOT_EMPTY(),CRYPT()] > > > > > db.t2_person.exposes=['name','email','password'] > > > > > db.t2_person.displays=['name','email','password'] > > > > > > t2=T2(request,response,session,cache,T,db) > > > > > > you can add fields to the t2_person table but you must have the above > > > > > fields. > > > > > > Massimo > > > > > > On Nov 1, 11:33 pm, Oscar <[EMAIL PROTECTED]> wrote: > > > > > > > Hi, > > > > > > > I was looking for how to extend a model, I mean, I working with T2 > > and > > > > > > I want to add some more fields to t2_persona table, I tryed > > defining > > > > > > again the table in my new project but It didn't worked. Some oen > > knows > > > > > > how I can accomplish this? > > > > > > > Regards, > > > > > > > Oscar. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---