support multiple paths in move DBox via new StoragePathNames() function, and pass that through to jinja
This commit is contained in:
6
path.py
6
path.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user