support multiple paths in move DBox via new StoragePathNames() function, and pass that through to jinja

This commit is contained in:
2021-06-24 17:33:42 +10:00
parent a412164ef7
commit 0a5e837236
2 changed files with 9 additions and 0 deletions

View File

@@ -28,3 +28,9 @@ class Path(db.Model):
def __repr__(self):
return f"<id: {self.id}, path_prefix: {self.path_prefix}, num_files={self.num_files}, type={self.type}>"
def StoragePathNames():
ret=[]
sps=Path.query.join(PathType).filter(PathType.name=='Storage').all()
for p in sps:
ret.append(p.path_prefix.replace('static/Storage/','') )
return ret