[web2py] Re: successfully created tables can not be accessed

2010-08-31 Thread Benjamin Goll
Hi, thank you very much, Adrian! You made my day! :-) I just replaced "db = DAL('sqlite://storage.sqlite')" by "db2 = DAL('sqlite://storage.sqlite')" in the file "db.py" and now it works like a charm! Thank you too, Massimo for clarifying how web2py handles this. Problem: solved! :-) Regards B

[web2py] Re: successfully created tables can not be accessed

2010-08-30 Thread mdipierro
when you use the shell to create tables or do anything else you have to be db.commit() the db.define_table() anyway has to be in the model. web2py controllers only see tables defined in the models. On Aug 30, 2:00 pm, Benjamin Goll wrote: > Hello Massimo, > > I'm using web2py version 1.83.2. > >

Re: [web2py] Re: successfully created tables can not be accessed

2010-08-30 Thread Adrian Klaver
On 08/30/2010 12:00 PM, Benjamin Goll wrote: Hello Massimo, I'm using web2py version 1.83.2. When I define the tables in shell-mode, everything looks fine: python web2py.py -S aubop -M db = DAL('sqlite://aubop.db') db.define_table('track', Field('title'), Field('artist'), Field('length'), Fi

[web2py] Re: successfully created tables can not be accessed

2010-08-30 Thread Benjamin Goll
Hello Massimo, I'm using web2py version 1.83.2. When I define the tables in shell-mode, everything looks fine: python web2py.py -S aubop -M >>> db = DAL('sqlite://aubop.db') >>> db.define_table('track', Field('title'), Field('artist'), Field('length'), >>> Field('filepath')) , [...] >>> db.defi

[web2py] Re: successfully created tables can not be accessed

2010-08-30 Thread mdipierro
which web2py version are you using? what you get if you print db.tables immediately after db.define_table() On Aug 30, 10:33 am, Benjamin Goll wrote: > Hello Massimo, > > thank you for your fast reply! > > Honestly I don't think that this is related to my problem since I only > tried to demonstr

[web2py] Re: successfully created tables can not be accessed

2010-08-30 Thread Benjamin Goll
Hello Massimo, thank you for your fast reply! Honestly I don't think that this is related to my problem since I only tried to demonstrate my problem with this example. If I define a table in a model, I should be able to access this table without any further configuration, right? So when I do the

[web2py] Re: successfully created tables can not be accessed

2010-08-30 Thread mdipierro
> >>> db = DAL('sqlite://aubop.db') > >>> db.tables > [] > That's strange, isn't it? this is fine. In fact even if the tables are in db, web2py does not discover them. You still need db.define_table(...) to inform web2py about them. I cannot say about the problem with the app, but could it be rel