I try this : requires = [IS_IN_DB(db, db.joernaal.id,'%(titel)s')] Don't getting the autocomplete... Is there something else to write somewhere to make it works except the []??
Thanks Richard On Fri, Jan 28, 2011 at 9:45 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > This: > > requires = IS_IN_DB(db, db.joernaal.id, '%(titel)s') > > indicates you want to a select/options dropbox and it takes time to > populate it. > > Use instead: > > requires = [IS_IN_DB(db, db.joernaal.id,'%(titel)s')] > > so no dropbox and use autocomplete. > > > On Jan 28, 5:54 am, Johann Spies <johann.sp...@gmail.com> wrote: > > On 28 January 2011 13:30, Lucas D'Avila <lucass...@gmail.com> wrote: > > > > > Hi ! > > > > > You can be more specific? have any suggestions to improve this? > > > > OK. For the following model, calling DAL.create it takes 65 seconds to > open > > the form using web2py's own webserver and 35 seconds when using Apache + > > WSGI. Both too long: > > > > db.define_table("artikel", > > Field("joernaal_id", > > db.joernaal, > > requires = IS_IN_DB(db, db.joernaal.id, > > '%(titel)s')), > > # widget =SQLFORM.widgets.autcomplete), > > Field("outeur_id", 'list:reference outeur'), > > Field("instansie_id", 'list:reference instansie'), > > Field("titel", "string", notnull=True), > > Field("opsomming", "text", notnull=True), > > Field("sleutelwoorde", "text", notnull=True), > > Field("vakgebied", "string", default=None), > > Field("publikasiejaar", "integer", default=None), > > Field("begin_bladsy", default=None), > > Field("laaste_bladsy", default=None), > > Field("volume", "string", default=None), > > Field('uitgawe', default=None), > > Field('pub_tipe', default = None), > > Field("taal", "string", default=None), > > Field("isi_indeks", default = None), > > Field("isap_indeks", default = None), > > Field("scopus_verwysing", > > requires=IS_EMPTY_OR(IS_URL())), > > Field("dokument_tipe"), > > Field('ouid', 'integer', > > requires = IS_EMPTY_OR(IS_IN_DB(db, > 'article.ouid'))), > > signature) > > > > I don't know what is causing this. I just guess it may the reference > > fields. > > > > Regards > > Johann > > > > -- > > May grace and peace be yours in abundance through the full knowledge of > God > > and of Jesus our Lord! His divine power has given us everything we need > for > > life and godliness through the full knowledge of the one who called us by > > his own glory and excellence. > > 2 Pet. 1:2b,3a >