Dear all,
[I posted my first message some days ago and did not saw it appearing on
the list, so I re-post, sorry]
I am developing a small-scale app, basically for +-15 users with tables
around 1000-10000 lines, except for one: post-codes (500000). The app works
fine with up to ~5000 postcodes, but with the real table, it simply crashes
the web2py process. Being small-scale, I suppose that using the "defaults"
is enough (the embedded rocket server, ubuntu 16.04, sqlite). Is there a
simple solution by modifying the model/controller, or is this about
switching to nginx?
A) The model: (for the two concerned tables, simplified to not flooding you
with details, "codespostaux" are the post-codes):
db.define_table('t_adresses',
Field('f_codepostal', type='reference t_codespostaux', notnull=True,
label=T('Codepostal')),
migrate=settings.migrate)
db.t_adresses.f_codepostal.widget = SQLFORM.widgets.autocomplete(request,
db.t_codespostaux.f_representationfield,
id_field=db.t_codespostaux.id,limitby=(0,10), min_length=2)
db.define_table('t_adresses_archive',db.t_adresses,Field('current_record','reference
t_adresses',readable=False,writable=False))
db.define_table('t_codespostaux',
Field('f_codepostal', type='string',
label=T('Codepostal'),
format='%(f_codepostal)s',
migrate=settings.migrate)
db.define_table('t_codespostaux_archive',db.t_codespostaux,Field('current_record','reference
t_codespostaux',readable=False,writable=False))
B) The Controller:
def adresses_manage():
form = SQLFORM.smartgrid(db.t_adresses,onupdate=auth.archive,csv=False)
return locals()
Best regards,
Jota
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.