Browse Source

Fix img assets missing in docker

api
dave 2 years ago
parent
commit
3aa2264be4
  1. 0
      assets/img/unknown.svg
  2. 2
      photoapp/daemon.py
  3. 4
      photoapp/dbutils.py
  4. 5
      setup.py

styles/dist/unknown.svg → assets/img/unknown.svg

2
photoapp/daemon.py

@ -264,7 +264,7 @@ class ThumbnailView(object):
if thumb_path:
return cherrypy.lib.static.serve_file(thumb_path, "image/jpeg")
else:
return cherrypy.lib.static.serve_file(os.path.join(APPROOT, "styles/dist/unknown.svg"), "image/svg+xml")
return cherrypy.lib.static.serve_file(os.path.join(APPROOT, "assets/img/unknown.svg"), "image/svg+xml")
@cherrypy.popargs('item_type', 'uuid')

4
photoapp/dbutils.py

@ -22,8 +22,8 @@ def get_engine_options(uri):
return {}
def get_db_engine(uri):
engine = sqlalchemy.create_engine(uri, **get_engine_options(uri))
def get_db_engine(uri, debug=False):
engine = sqlalchemy.create_engine(uri, **get_engine_options(uri), echo=debug)
Base.metadata.create_all(engine)
return engine

5
setup.py

@ -22,11 +22,12 @@ setup(name='photoapp',
"photocli = photoapp.cli:main",
# "photoimport = photoapp.ingest:main", # broken for now
# "photovalidate = photoapp.validate:main",
#"photooffset = photoapp.dateoffset:main",
# "photooffset = photoapp.dateoffset:main",
]
},
include_package_data=True,
package_data={'photoapp': ['../templates/*.html',
'../templates/fragments/*.html',
'../styles/dist/*']},
'../styles/dist/*',
'../assets/img/*']},
zip_safe=False)
Loading…
Cancel
Save