I don't believe that's true.

For instance, in the aforementioned example my code has a mysql db uri
specified in db.py, but the mysql driver is never loaded, despite its
obvious presence in the virtualenv. Only the sqlite3 driver gets
loaded.

The different behavior can clearly be observed after running w2p_clone
and then running w2p_run from env/bin vs. env/web2py/bin. The former
is 1.98.2 and the latter is 1.99.3. Just an observation, not
necessarily causation.

I noted the old version on the pip install. The version getting
invoked seems to change with the location in the project tree. I
believe there is something wrong with the way the pip install web2py
sets up within the virtualenv but I'm not sure what. The following
examples are, of course, after running source env/bin/activate.

========================================================================
Running env/bin/w2p_run from root directory (web2py version correct,
but
no mysql drivers loaded):
========================================================================
(env)[watson@watson-thinkpad web2py_heroku (master)]$ env/bin/w2p_run
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.98.2 (2011-08-28 09:59:26)
Database drivers available: SQLite3, mongoDB

=========================================================================
Running env/web2py/w2p_run after w2p_clone from root directory (note
wrong
web2py version, but mysql drivers loaded) :
=========================================================================

(env)[watson@watson-thinkpad web2py_heroku (master)]$ env/web2py/
w2p_run
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.98.2 (2011-08-28 09:59:26)
Database drivers available: SQLite3, pymysql, mongoDB
Starting hardcron...
WARNING:web2py:GUI not available because Tk library is not installed

=========================================================================
Running env/web2py/w2p_run from same directory (note correct web2py
version and mysql drivers loaded)
=========================================================================

(env)[watson@watson-thinkpad web2py (master)]$ w2p_run
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.3 (2011-11-28 08:28:56) dev
Database drivers available: SQLite3, pymysql, mongoDB
Starting hardcron...
WARNING:web2py:GUI not available because Tk library is not installed

Hope this helps.

Thanks,
David

On Nov 28, 5:51 pm, Christopher Steel <chris.st...@gmail.com> wrote:
> To change db backends you need to edit the db.py file and that should do it.

Reply via email to