Re: [web2py] cost of importing into models vs define functions

2015-03-29 Thread Richard Vézina
I move functions declared in models... Since all my models files seems to be executed (looking to models_to_run), these functions are accessible from everywhere (globals)... Now I import all the moved functions in the same models they were commenting the old declarations and I get some speed impro

Re: [web2py] cost of importing into models vs define functions

2015-03-29 Thread Jose
Hi [*1*] models/ model1.py model2.py model3.py model4.py vs [*2*] modules/ model1.py model2.py model3.py model4.py models/ model0.py (import model1, model2, model3, model4) You say [2] is more efficient than [1]? -- Resources: - http://web2py.com - http:

[web2py] http://www.geonames.org/ - countries with political subdivisions - allcountries.zip

2015-03-29 Thread Alex Glaros
Does anyone have the geonames.org countries tables installed in w2p? Not sure if my question makes sense in terms of copyable functionality but am curious if others have used the tables. Here are some related links: http://download.geonames.org/export/dump/ https://pypi.python.org/pypi/pycountr

[web2py] Re: Write dynamic query in DAL without extra nested parentheses

2015-03-29 Thread Niphlod
btw: sqlite has a pretty "deep" default value that should handle 1000 of those "or". but or the sake of your app is it reaally necessary to fetch records in a single query asking for 1000 specific values ? On Saturday, March 28, 2015 at 6:37:03 PM UTC+1, Anthony wrote: > > In this particular

[web2py] SQL designer still not working

2015-03-29 Thread Ron Chatterjee
After so long "SQL designer still not working". Not only it doesn't generate the DAL tables/field. There are no option for import/export either. Would be nice to have an import function so we can input XML (at least) and convert that into DAL. Any reason why its being held up? Any timeframe whe

[web2py] Re: web2py.com/sqldesigner not working import export

2015-03-29 Thread Ron Chatterjee
After so long "SQL designer still not working". Not only it doesn't generate the DAL tables/field. There are no option for import/export either. Would be nice to have an import function so we can input XML (at least) and convert that into DAL. Any reason why its being held up? Any timeframe whe

[web2py] Re: Web2py: Create a CSV file to download for an executesql result

2015-03-29 Thread Anthony
If you know the column names and types ahead of time, you can do something like this: db.define_table('mydummytable', Field('field1'), ..., migrate=False) rows = db.executesql(sql_statement, fields=db.mydummytable) The purpose of the dummy table i

[web2py] Re: Belongs not working

2015-03-29 Thread Leonardo Pires Felix
I think i misunderstood then. Em domingo, 29 de março de 2015 01:15:01 UTC-3, Anthony escreveu: > > Yes, but you are doing the opposite here. You are not checking whether a > field value belongs to a list - you are checking whether a list stored in a > field contains a particular value. The book