Re: [web2py] Re: Speeding up IS_IN_DB

2011-02-24 Thread Richard Vézina
Ok I thought it had been changed and the only thing we have to do is what was wrote... Thanks Richard On Thu, Feb 24, 2011 at 9:09 AM, DenesL wrote: > > See http://web2py.com/book/default/chapter/07#Autocomplete-Widget > > On Feb 23, 10:23 pm, Richard Vézina > wrote: > > I try this : requires

[web2py] Re: Speeding up IS_IN_DB

2011-02-24 Thread DenesL
See http://web2py.com/book/default/chapter/07#Autocomplete-Widget On Feb 23, 10:23 pm, Richard Vézina wrote: > 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 []?? >

Re: [web2py] Re: Speeding up IS_IN_DB

2011-02-23 Thread Richard Vézina
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: > > re

[web2py] Re: Speeding up IS_IN_DB

2011-02-02 Thread Mirek Zvolský
It is hard to implement following internal behaviour of the control. But I have used it earlier in other language, and it was nice behaviour when there were many records in the related table. Here we need to use JavaScript/Ajax to implement this. And maybe an index on that field? Once user pressed

[web2py] Re: Speeding up IS_IN_DB

2011-01-31 Thread Massimo Di Pierro
The rationale is easy. The field is never a problem. The problem is the forms. If you need to list all the options, you need to gather all the options from database. That is a performance hog. Using autocomplete is better. The issue is the same for reference and list:reference. On Jan 31, 9:21 am,

[web2py] Re: Speeding up IS_IN_DB

2011-01-31 Thread Anthony
On Monday, January 31, 2011 10:02:14 AM UTC-5, DenesL wrote: > > > On Jan 28, 5:27 pm, Massimo Di Pierro > wrote: > > Are you suggesting we change the way the default is assigned? If so.. > > let's duscuss this inw eb2py-developers because it is a complex > > matter. > > No, just pointing it

[web2py] Re: Speeding up IS_IN_DB

2011-01-31 Thread DenesL
On Jan 28, 5:27 pm, Massimo Di Pierro wrote: > Are you suggesting we change the way the default is assigned? If so.. > let's duscuss this inw eb2py-developers because it is a complex > matter. No, just pointing it out. web2py users can just "listify" the requires to avoid the dropdown and its p

Re: [web2py] Re: Speeding up IS_IN_DB

2011-01-30 Thread Johann Spies
Maybe this is related - I have not noticed it before: In the terminal from where I started web2py the following appeared: Uncaught RangeError: Maximum call stack size exceeded Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord!

Re: [web2py] Re: Speeding up IS_IN_DB

2011-01-30 Thread Johann Spies
On 28 January 2011 19:54, Massimo Di Pierro wrote: > Something else is wrong. If you have requires=[...] it should not > query the db for the possible references and it should not make the > dropdown. > > Can we see the entire model? > > I have posted the model for this table in an earlier message

[web2py] Re: Speeding up IS_IN_DB

2011-01-28 Thread Massimo Di Pierro
Are you suggesting we change the way the default is assigned? If so.. let's duscuss this inw eb2py-developers because it is a complex matter. Massimo On Jan 28, 12:16 pm, DenesL wrote: > list:reference fields get an IS_IN_DB validator if no explicit > requires is defined. > Note: the assigned re

[web2py] Re: Speeding up IS_IN_DB

2011-01-28 Thread DenesL
list:reference fields get an IS_IN_DB validator if no explicit requires is defined. Note: the assigned requires is not a list. On Jan 28, 12:54 pm, Massimo Di Pierro wrote: > Something else is wrong. If you have requires=[...] it should not > query the db for the possible references and it shou

[web2py] Re: Speeding up IS_IN_DB

2011-01-28 Thread Massimo Di Pierro
Something else is wrong. If you have requires=[...] it should not query the db for the possible references and it should not make the dropdown. Can we see the entire model? Massimo On Jan 28, 10:01 am, Johann Spies wrote: > On 28 January 2011 16:45, Massimo Di Pierro wrote: > > > This: > > > re

Re: [web2py] Re: Speeding up IS_IN_DB

2011-01-28 Thread Johann Spies
On 28 January 2011 15:48, DenesL wrote: > > According to your model you have two references: > 1) joernaal.id (with autocomplete) > 2) article.ouid (without) > There are also two other fields with list_references. There are about 137000 records in article and 8200 in joernaal. Regards Johann -

Re: [web2py] Re: Speeding up IS_IN_DB

2011-01-28 Thread Johann Spies
On 28 January 2011 16:45, Massimo Di Pierro 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 an

[web2py] Re: Speeding up IS_IN_DB

2011-01-28 Thread Massimo Di Pierro
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 wrote: > On 28

[web2py] Re: Speeding up IS_IN_DB

2011-01-28 Thread DenesL
According to your model you have two references: 1) joernaal.id (with autocomplete) 2) article.ouid (without) How many records do you have in joernaal and in article tables?. On Jan 28, 6:54 am, Johann Spies wrote: > On 28 January 2011 13:30, Lucas D'Avila wrote: > > > Hi ! > > > You can be m