First you don't need to write you connection string like this:
db = DAL('postgres:psycopg2://postgres:password@localhost/testbank')
You can use this:
db = DAL('postgres://postgres:password@localhost/testbank')
I always set pg_hba.conf (this is on my development box not my live server)
# Database a
ok, i installed the rpm version of psycopg2 and web2py recognizes it when i
run "python web2py.py". i then added a very simple application under the
admin interface and added only:
db = DAL('postgres:psycopg2://postgres:password@localhost/testbank')
to the db.py file. when i run the "database
Until trunk is stable I suggest you just install psycopg2 and use that.
Once you install the python driver everything will just work without any
change to your code.
On Wed, Jul 11, 2012 at 1:45 PM, Cliff Kachinske wrote:
> +1 for psycopg2. Works fine for me.
>
> I missed that you weren't using
+1 for psycopg2. Works fine for me.
I missed that you weren't using it.
On Wednesday, July 11, 2012 4:40:56 PM UTC-4, lucas wrote:
>
> hey wade,
>
> yes, i have been banging my head on this one because i have had success
> with web2py and postgresql for quite a while. my admin interface says
hey wade,
yes, i have been banging my head on this one because i have had success
with web2py and postgresql for quite a while. my admin interface says that
my "web2py is up to date" and that is currently on version 1.99.7. so what
is the best method toi update my web2py? i am using centos 6
Not sure but I am sure this issue was fixed in trunk.
On Wednesday, 11 July 2012 03:40:55 UTC-5, lucas wrote:
>
> hello one and all,
>
> i have web2py 1.99.7 under centos 6.2 with postgres 9.1. i am trying to
> connect to postgres using the standard:
>
> db = DAL('postgres://postgres:password@lo
There is a bug with the version of the web2py you are using update to a
newer version. There has been a few posts in this group about that.
The other solution is to install psycopg2 and use that driver.
On Wed, Jul 11, 2012 at 7:05 AM, Cliff Kachinske wrote:
> Have you created a postgres user?
Have you created a postgres user?
Does the user own the database?
Does the user have a password?
If not, make these things happen. A Google search will take you to the
Postgres manual pages.
If there is a user named "testuser" with a password "testword" then your
connection string should look
and i did "CREATE DATABASE testbank;" under psql and it does exist as an
empty database at this point.
my install does recognize the pg8000 driver:
[root@q3200 web2py]# python web2py.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.7 (2012-03-04 22:12:08) stable
Database drivers available: SQLite3, pymysql, pg8000, IMAP
Starting hardcron...
10 matches
Mail list logo