Given the model for web2py-wiki:

db.define_table('tag',
   db.Field('name'))

db.tag.name.requires=IS_NOT_EMPTY()

db.define_table('page',
   db.Field('uuid',length=128,writable=False,default=str(uuid.uuid4
())),
   db.Field('title'),
   db.Field('menu',length=128),
   db.Field('public','boolean',default=False),
   db.Field('active','boolean',default=True),
   db.Field('body','text'),
   db.Field('tags','text'),
   db.Field('created_by',db.auth_user,default=who,writable=False),
   db.Field('created_on','datetime',default=now,writable=False))

db.page.title.requires=IS_NOT_EMPTY()
db.page.tags.requires=IS_IN_DB(db,'tag.id','%(name)s',multiple=True)


Can somebody explain to to me what is meant by the last line???

It seems to me this line has a diffenrent meaning: db.Field
('tags','text').
I believe it should be somthing like: db.Field('tags', db.tag) or
perhaps a SET or ENUM of tags...

Put how is that produced dynamicly? Haven't found anything in the book
or API yet..

--~--~---------~--~----~------------~-------~--~----~
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