[web2py] Re: Filtering tags in crud form dropdowns
I found that the way to make this work is to set the filtering (requires directive) in the controller instead of in the model. :) On Aug 12, 2:40 pm, noelrv noe...@gmail.com wrote: I have issues implementing a filtered list of tags in a crud form dropdown. In the models below, each book belongs to a category and has one or more tags. Each category has a specified set of tags by defining tag.categories as a list:reference. The crud form dropdown shows a filtered tag list if I explicitly specify a value for contains: categorytags = db(db.tag.categories.contains(6)) but not, if I use: categorytags = db(db.tag.categories.contains(db.book.category)) db.define_table('category', Field('name'), format='%(name)s') db.define_table('tag', Field('name'), Field('categories','list:reference category'), format='%(name)s') db.define_table('book', Field('title'), Field('category',db.category), Field('tags','list:reference tag')) categorytags = db(db.tag.categories.contains(db.book.category)) db.book.tags.requires=IS_IN_DB(categorytags,'tag.id',db.tag._format,multiple=True)
[web2py] Extra p/p in MARKMIN
Entered using MarkItUp as: Use fdisk to create LVM partition `` + fdisk /dev/sda `` Html source in Firefox : h4Use fdisk to create LVM partition/h4 p/p pre code class= + fdisk /dev/sda /code The p/p above adds an unwanted blank space.
[web2py] Filtering tags in crud form dropdowns
I have issues implementing a filtered list of tags in a crud form dropdown. In the models below, each book belongs to a category and has one or more tags. Each category has a specified set of tags by defining tag.categories as a list:reference. The crud form dropdown shows a filtered tag list if I explicitly specify a value for contains: categorytags = db(db.tag.categories.contains(6)) but not, if I use: categorytags = db(db.tag.categories.contains(db.book.category)) db.define_table('category', Field('name'), format='%(name)s') db.define_table('tag', Field('name'), Field('categories','list:reference category'), format='%(name)s') db.define_table('book', Field('title'), Field('category',db.category), Field('tags','list:reference tag')) categorytags = db(db.tag.categories.contains(db.book.category)) db.book.tags.requires=IS_IN_DB(categorytags,'tag.id',db.tag._format,multiple=True)
[web2py] Re: http://www.web2py.com/book/default/chapter/11
Following reference URL is probably a better and more stable link. http://www.tc.umn.edu/~brams006/selfsign.html Noel On Jul 21, 11:33 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: You cannot but add a note and I will fix it soon. On Jul 21, 2:12 am, cjrh caleb.hatti...@gmail.com wrote: On Thursday, 21 July 2011 05:38:47 UTC+2, noelrv wrote: URL for ref.83 is broken -http://sial.org/howto/openssl/self-signed Massimo: what do I do with ref.``openssl``:cite? Where can I fix the target of the cite ref in the book?
[web2py] http://www.web2py.com/book/default/chapter/11
URL for ref.83 is broken - http://sial.org/howto/openssl/self-signed
[web2py] typo: http://www.web2py.com/book/default/chapter/11
typo in apt-get below: sudo apt-egt -y install libapache2-mod-proxy-html