Massimo Di Pierro wrote:
The new grid/smartgrid have a much better search feature. A new button
query shows a popup panel that allows you to build the query string.
Can you please check on your existing tables and see if you encounter
any problems?


The capabilities columns seems to be missing in the list that appears after pressing query (tried with iceape 2.0.14 and chromium 14.0.835.163 (Developer Build 101024 Linux) Built on Debian unstable, running on Debian wheezy/sid.


*****
model
*****

db.define_table('servers',
Field('name', 'string', length=63, default='testserver', required=True, notnull=True, unique=True, label="Server name"), Field('ip', 'string', requires=IS_IPV4(), required=True, notnull=True, unique=True, label="Server ip address"), Field('folder', 'string', length=256, default=DEFAULT_TESTIMON_FOLDER, required=True, notnull=True, label='installation folder'), Field('capabilities', 'list:string', requires = IS_EMPTY_OR(IS_IN_DB(db, db.capabilities.capability, multiple=True)), readable=True, writable=True)
)
from plugin_multiselect_widget import hmultiselect_widget
db.servers.capabilities.widget = hmultiselect_widget


# NOTE: (hmultiselect_widget is a widget from http://dev.s-cubism.com/web2py_plugins; but removing it doesn't make a difference)

**********
controller
**********


def server_administration():
links = [lambda row: A('Check status',_href=URL(c='administration', f='check_server_status/%s' % row.id))]
  servers = SQLFORM.grid(
                db.servers,
                links = links,
                deletable=True,
                editable=True,
                create=True)

  return dict(servers=servers)

****
view
****

{{=servers}}


Reply via email to