Browse Source

Fix img assets missing in docker

api
dave 1 year ago
parent
commit
3aa2264be4
4 changed files with 6 additions and 5 deletions
  1. +0
    -0
      assets/img/unknown.svg
  2. +1
    -1
      photoapp/daemon.py
  3. +2
    -2
      photoapp/dbutils.py
  4. +3
    -2
      setup.py

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


+ 1
- 1
photoapp/daemon.py View File

@@ -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')


+ 2
- 2
photoapp/dbutils.py View File

@@ -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



+ 3
- 2
setup.py View File

@@ -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