from gluon.contrib.heroku import get_db
db = get_db(name=None, pool_size=10)

On Monday, April 22, 2013 1:51:31 AM UTC+1, Massimo Di Pierro wrote:
>
> How are you connecting to the database?
>
> On Sunday, 21 April 2013 18:49:28 UTC-5, Vixus wrote:
>>
>> My app is deployed on Heroku using the PostgreSQL db. No issues with 
>> running the app, everything seems to be working.
>> Except for the following: I have some initial data that is entered when 
>> my database is initialised (ie. when all the tables are empty). This code 
>> is in a model and basically is:
>>
>> if db(db.table).isempty():
>>   db.table.insert(field1=bla, field2=bla)
>>   db.commit()
>>
>> This worked fine when I was using sqlite testing locally but now on 
>> heroku it doesn't work anymore. Why is this?
>>
>

-- 

--- 
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/groups/opt_out.


Reply via email to