[web2py] Connect DAL to Azure Postgres Instance

2018-09-27 Thread gb
Trying to connect to Azure-hosted postgres on version 2.17.1-stable+timestamp.2018.08.06.01.02.56 If I try and connect with: db = DAL( "postgres://dbname@dbname-postgres:p...@dbname-postgres.postgres.database.azure.com/dbname" ) I get this: Invalid URI string in DAL I thought it might have to

[web2py] Best approach for simultaneous async API calls

2015-02-24 Thread gb
I need to render a page that requires a number of REST API calls to external web services that take a significant amount of time to return. What is the best approach to fire all of these calls simultaneously instead of sequentially? Should I try something like Celery: https://groups.goo

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

2015-03-28 Thread gb
What is the DAL Code to generate a query like this: SELECT * FROM product WHERE product.id=1 OR product.id=2 OR product.id=3 OR product.id product.id=4 OR product.id=5; or even: SELECT * FROM product WHERE (product.id=1) OR (product.id=2) OR (product.id=3) OR (product.id=4) OR (product.id=5); I'

[web2py] Re: SQL designer still not working

2015-03-31 Thread gb
Not sure exactly what you mean, but you can use this and select to export to web2py DAL: https://code.google.com/p/wwwsqldesigner/ (I've ported it here) https://github.com/borng/wwwsqldesigner Live Demo: http://ondras.zarovi.cz/sql/demo/ On Sunday, March 29, 2015 at 11:31:50 AM UTC-6, Ron Chatt

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

2015-03-31 Thread gb
I have a list of products (much less than 1000) that the users can select or unselect--I supposed I could only select on the unselected items. If it's above 80 or so sqlite throws parser stack overflow, see code below: db.define_table("product") query = [] for i in xrange(90):

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

2015-03-31 Thread gb
Thanks, Gary! Works perfectly. On Tuesday, March 31, 2015 at 4:27:12 PM UTC-6, Gray Kanarek wrote: > > You want belongs, I think: > > query = db.product.id.belongs((selected_ids)) > > > > On Saturday, March 28, 2015 at 12:14:44 PM UTC-4, gb wrote: >> >> What

[web2py] RuntimeError: No driver of supported ones ('pymongo',) is available

2019-10-02 Thread gb
import pymongo works fine from the python shell. However, I'm getting this error Failure to connect, tried 5 times: > Traceback (most recent call last): File > "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 457, in > __init__ self._adapter = adapter(**kwargs) File > "/home/