[web2py] Re: GAE delete() has subtle difference compared to native Web2Py

2010-02-21 Thread what_ho
I got the same issue, delete operations by id work locally, but not on gae (dev_appserver or live). Modifying from .count() to len(..) appears to fix this for me. I locally modified the delete method in gql.py, line 692 as follows: def delete(self): self._db['_lastsql'] = 'DELETE WHERE %

[web2py] google app engine, file size limits

2010-02-22 Thread what_ho
Hi all - I wonder if anyone else has hit the file-size upload limits on GAE? This limit is supposed to be 10MB which for my needs would be fine. The GAE file system is read-only so I save upload data in the database like this: Field('file','upload',uploadfield='file_binary', ... Field('file_bina

[web2py] Re: google app engine, file size limits

2010-02-22 Thread what_ho
ython supports multiple > > files in memory. > > However this will be very expensive to do, if you have a 10MB file it > will most likely take at "least" double the ram to perform this > operation. > > -Thadeus > > > > On Mon, Feb 22, 2010 at 9:29 AM, wha

[web2py] Re: How to plan building an webapp that runs on GAE with web2py?

2010-02-22 Thread what_ho
Hi Snaky - Identical source code can be deployed both to GAE and elsewhere without editing, you don't need to edit connection strings before deploying to GAE. The default db.py code you get with a new project detects if gae is running with the line if request.env.web2py_runtime_gae: ... using thi

[web2py] Re: google app engine, file size limits

2010-02-22 Thread what_ho
I had not heard of the blobstore service before - thank you for pointing that out. I agree - well worth considering, up to 1GB files the service is still free. On Feb 22, 6:22 pm, villas wrote: > For anything above 1Mb,  I think Google are trying their best to > promote their new 'blobstore' whic

[web2py] Re: google app engine, file size limits

2010-02-23 Thread what_ho
I got web2py working with blobstore, have written up details on the steps I took here: http://www.web2pyslices.com/main/slices/take_slice/63 - Alex On Feb 22, 7:42 pm, what_ho wrote: > I had not heard of the blobstore service before - thank you for > pointing that out. I agree - well

[web2py] Re: google app engine, file size limits

2010-02-23 Thread what_ho
I got the blobstore service working with web2py for up to 50MB file support on GAE. Have written up the steps I took here: http://www.web2pyslices.com/main/slices/take_slice/63 - Alex On Feb 22, 7:42 pm, what_ho wrote: > I had not heard of the blobstore service before - thank you

[web2py] Re: google app engine, file size limits

2010-02-24 Thread what_ho
no problem! With some informal testing I found the blobstore absolutely flies along, serves up files as fast as whatever internet connection I tried could handle. I did not load test with multiple users, but I don't doubt this service is built to scale. The blobstore is meant for file upload and

[web2py] Re: webform actions

2010-03-01 Thread what_ho
I have used css in forms to position the default submit button as the first button declared in the form html before, even though on-screen it may appear anywhere in the form. If you need a javscript-free solution this arrangement works across all the browsers. The basic premise is:

[web2py] Formatting multiple select field

2010-03-21 Thread what_ho
As an example of a multiple select field definition: db.define_table('fruit',Field('name')) db.define_table('fruit_basket',Field('contents')) db.fruit_basket.contents.requires=IS_IN_DB(db,'fruit.id','% (name)s',multiple=True) db.fruit.insert('apple') db.fruit.insert('orange') db.fruit.insert('ban

[web2py] Re: Formatting multiple select field

2010-03-22 Thread what_ho
u suggest. > > Anyway |1|2|11| allows you to search for |1| or |2| or |11|. > > This 1|2|11 would create problems when searhing for 1, in > particularing considering that values can be non-numeric. > > On Mar 21, 5:48 pm, what_ho wrote: > > > > > As an exam

[web2py] Re: Drop boxes in 1.76.5

2010-03-22 Thread what_ho
This is a breaking change I support. For other UI widgets like the text widget, the default behaviour is not to submit any value during a form submit without explicit user input. It makes sense to align the default behaviour of other UI widgets as much as possible to the same. When other framework

[web2py] Re: Drop boxes in 1.76.5

2010-03-22 Thread what_ho
Yes - correct, sorry I didn't make that clear. I support the historical breaking change to zero='' On Mar 22, 2:12 pm, mdipierro wrote: > You say > > On Mar 22, 7:01 am, what_ho wrote: > > > This is a breaking change I support. For other UI widgets like

[web2py:29167] Re: Questions for large deployment

2009-08-23 Thread what_ho
Intrigued by the recommendation to put code in modules instead of models if possible. At present I have db.define_table .. method calls in a model file. The database structure will stay the same between releases, so it does not feel optimal at present to have such definitions run on every page re

[web2py:29215] Re: Questions for large deployment

2009-08-24 Thread what_ho
I did some quick and dirty performance tests to measure the time taken by db.define_table calls. Test was as follows: - Run web2py locally, with built-in web server - Create new application 'perftest' in web2py admin interface - Add 5 dummy table definitions to db.py, uncomment mail and auth sett

[web2py:29220] Re: Questions for large deployment

2009-08-24 Thread what_ho
: not compiled: 22.4s compiled: 16s - Alex On Aug 24, 11:19 am, mdipierro wrote: > thanks for this test. Would you be able to also test them setting > > db.define_table(,migrate=False) > > ? > > which is what people should do on production. > > Massimo > > O

[web2py:29236] Re: Questions for large deployment

2009-08-24 Thread what_ho
no problem! correct - 12ms per request is the time I recorded to completely process one webpage request, from the start point of the http request headers being sent to the server, to the last byte of the HTTP 200 response being successfully received by the client. This is using all default setti

[web2py:29648] Re: Questions for large deployment

2009-08-30 Thread what_ho
Hi all - just had time this weekend to look further into this. Thank you to suggestions from Iceberg, Yarko and Massimo. I have tried putting table definitions into a module, and also run some timing tests against a Postgres database As a note, for my previous tests coming out at 12ms page respo

[web2py:29649] Re: Questions for large deployment

2009-08-30 Thread what_ho
components. Cheers, -Alex On Aug 23, 9:04 pm, Yarko Tymciurak wrote: > On Sun, Aug 23, 2009 at 1:55 PM, what_ho wrote: > > > Intrigued by the recommendation to put code in modules instead of > > models if possible. > > > At present I have db.define_table .. method ca

[web2py:29650] Re: Questions for large deployment

2009-08-30 Thread what_ho
, 1:28 pm, Iceberg wrote: > Thanks for the interesting test, Pearson (What_Ho). > > Besides of trying Yarko's "putting table definitions in gluon just as > a quick hack to compare performance", would you mind try a more > general way? > > A. Put table definitio