I have a table A that is referenced by another B using the standard
reference type in web2py.
db.define_table('A',
...
field('name')
...
)
db.define_table('B',
...
field('A', db.A)
...
)
Previously, everything was working fine but after importing a sizeable
amount of records (>300k ro
f B.A comes from a A.id (represented by A.name) and you have
> 300,000 options, you probably do not want a dropdown but you want
> autocomplete. You just need:
>
> db.B.A.widget = SQLFORM.widgets.autocomplete(request, db.A.name, db.A.id)
>
> Massimo
>
> On Tuesday, 4 Decem
you can do that with
>
> all_courses = db(db.courses.id>0)._select(db.courses.memberid)
> all_members_not_in_courses = db(~db.members.id.belongs(all_courses))
>
>
>>
Would such an approach be computationally expensive particularly if the
number of rows in courses is high? Perhaps the following r
Wednesday, September 25, 2013 2:56:09 PM UTC+8, Niphlod wrote:
>
>
>
> Il giorno mercoledì 25 settembre 2013 08:46:15 UTC+2, onetwomany ha
> scritto:
>>
>>
>>
>> you can do that with
>>>
>>> all_courses = db(db.courses.id&
4 matches
Mail list logo