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
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.
>
>
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
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
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
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
> >>> 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
7 matches
Mail list logo