Rearrange source into something resembling a package
This commit is contained in:
parent
b7e9d6a351
commit
13e1f7650a
@ -122,7 +122,7 @@ if __name__ == '__main__':
|
||||
args = parser.parse_args()
|
||||
|
||||
dirname = os.path.dirname(os.path.realpath(__file__))
|
||||
dbpath = os.path.realpath(os.path.join(dirname, '..', 'db', 'data.sqlite'))
|
||||
dbpath = os.path.realpath(os.path.join(dirname, '..', '..', 'db', 'data.sqlite'))
|
||||
db = sa.create_engine(f"sqlite:///{dbpath}")
|
||||
|
||||
session = sa.orm.Session(db)
|
0
src/edible_elephant/www/__init__.py
Normal file
0
src/edible_elephant/www/__init__.py
Normal file
@ -36,7 +36,6 @@ DBSession = sqlalchemy.orm.scoped_session(
|
||||
def init_model(engine):
|
||||
DBSession.configure(bind=engine)
|
||||
|
||||
|
||||
config.update_blueprint({
|
||||
'model': tg.util.Bunch(
|
||||
DBSession=DBSession,
|
||||
@ -44,6 +43,13 @@ config.update_blueprint({
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||
|
||||
import edible_elephant.db
|
||||
|
||||
application = config.make_wsgi_app()
|
||||
|
||||
import wsgiref.simple_server
|
0
src/edible_elephant/www/static/.keep
Normal file
0
src/edible_elephant/www/static/.keep
Normal file
Loading…
Reference in New Issue
Block a user