To me it sounds like your are recreating the db variable with every .py file. You should have only one db = row no matter how many files you have. And it should be in the first model that is read.

An easy way of knowing in what order files are read is to name them 0_something.py 1_something_else.py and so on.


Kenneth

Only one of my model files, workout.py, has tables which are being
created.  All other models, including db.py, are not created.  I have
been trying to figure this out for the past two days, I do not know
why they are not working now, as they were working before.

Workout.py has the same format/imports as all other files.  Yet it is
the only model file which is getting imported into the database.  My
model file messaging.py, which was working two weeks ago, is no longer
working.  I did not edit it any, it just stopped working.  Any help
would be appreciated.

Workout.py heading:

# coding: utf8
db = DAL('sqlite://storage.sqlite')

import os
import datetime

from gluon.tools import *
auth = Auth(globals(),db)                      # authentication/
authorization
crud = Crud(globals(),db)                      # for CRUD helpers
using auth

auth.settings.hmac_key =
'sha512:a0bf5d13-2d97-4cea-922d-53ed1d7d6e79'   # before
define_tables()
auth.define_tables()

# Workout systems




Messaging.py heading:

# coding: utf8
db = DAL('sqlite://storage.sqlite')

from gluon.tools import *
auth = Auth(globals(),db)                      # authentication/
authorization
crud = Crud(globals(),db)                      # for CRUD helpers
using auth

auth.settings.hmac_key =
'sha512:a0bf5d13-2d97-4cea-922d-53ed1d7d6e79'   # before
define_tables()
auth.define_tables()

#Support systems

Reply via email to