[web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
Thanks a lot. It worked. Regards On Thursday, February 27, 2020 at 8:46:00 PM UTC+3, Jim S wrote: > > Try commenting out > > db = DAL("sqlite://xstorage.db", folder=os.path.join(os.path.dirname( > __file__), "databases")) > > in models.py > > Do you already have that in common.py? > > In your

Re: [web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
I get it. Let me work it out in the next hour. Kind regards On Thu, Feb 27, 2020, 20:46 Jim S wrote: > Try commenting out > > db = DAL("sqlite://xstorage.db", folder=os.path.join(os.path.dirname( > __file__), "databases")) > > in models.py > > Do you already have that in common.py? > > In your

[web2py] Re: py4web defining tables

2020-02-27 Thread Jim S
Try commenting out db = DAL("sqlite://xstorage.db", folder=os.path.join(os.path.dirname( __file__), "databases")) in models.py Do you already have that in common.py? In your controller you're importing db from common, but the instance in common doesn't have any tables defined. You redefined

[web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
In my models, I have: import os import datetime as dt from datetime import datetime, timedelta, date from py4web import action, request, DAL, Field, Session, Cache, user_in from py4web.utils.auth import Auth from py4web import action, request, abort, redirect, URL, Field from py4web.utils.form

[web2py] Re: py4web defining tables

2020-02-27 Thread Jim S
Yes, I am aware of that, but what file is that in? You didn't specify. Is that in the same controller the other snippet is in? If so, then you're redfining db and the table in your controller which in your second to last line of your post you say you're not doing. I'm confused... I'd

[web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
I already have that, see above code second last line on imports On Thursday, February 27, 2020 at 4:35:25 PM UTC+3, Jim S wrote: > > Where is db being defined in your controller? Are you importing it from > common? > > In my controller I have > > from ..common import db, session, T, cache,

[web2py] Re: py4web defining tables

2020-02-27 Thread Jim S
Where is db being defined in your controller? Are you importing it from common? In my controller I have from ..common import db, session, T, cache, auth, logger and later @action.uses("applications/index.html", session, db, T, auth.user) def index(): page['sub_title'] = A('MENU',