I just started a brand-new app through the wizard and plugged in my mysql 
database settings during the setup process. I see that in 0.py I have the 
following :

settings.database_uri = 'mysql://user:pass@server/database' (i censored the 
original)

but in db.py it says:

if not request.env.web2py_runtime_gae:
    ## if NOT running on Google App Engine use SQLite or other DB
    db = DAL('sqlite://storage.sqlite')

after I changed the db= line to what was in settings.database the mysql 
tables showed up. Before that I did not see them. 

Is this a bug or was there something else I have to toggle after going 
through the app wizard?

Thanks!
Mike

On Monday, February 7, 2011 8:48:09 PM UTC-5, Massimo Di Pierro wrote:
>
> 0.py is not a web2py file. It is created by the wizard. If a variable 
> is not used is a bug in the wizard. 
>
> Massimo 
>
> On Feb 7, 7:21 pm, devGS <vitali....@geniestills.com> wrote: 
> > I saw that object 'settings' is defined at 0.py, but I didn't see any 
> > usage of 'settings'. For instance, in db.py, instead of reusing the 
> > 0.py's 'settings', the stings are redefined, even though realize about 
> > some modules that use 'settings' instead of db.py set variables. Can 
> > this point be cleared please? Why is there mail.settings.XYZ = '...' 
> > instead of 'mail.settings.XYZ = settings.XYZ'? Thanks.

Reply via email to