Commit 313055fe by Alexander Kryklia

transfer images list to html

parent ccb8e96a
...@@ -816,9 +816,11 @@ class DragAndDropInput(InputTypeBase): ...@@ -816,9 +816,11 @@ class DragAndDropInput(InputTypeBase):
try: try:
images_list = self.system.filestore.listdir(os.path.join('static', images_list = self.system.filestore.listdir(os.path.join('static',
'images', imagepath)) 'images', imagepath))
images_list = ['/static/images/' + img for img in images_list]
except: except:
images_list = [] images_list = []
self.loaded_attributes['images_list'] = images_list self.loaded_attributes['images_list'] = images_list
self.to_render.add('images_list')
registry.register(DragAndDropInput) registry.register(DragAndDropInput)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
% if images_list: % if images_list:
<ul> <ul>
% for item in images_list: % for item in images_list:
<li>${item}</li> <li><image width="100" height="100" src="${item}"></image></li>
% endfor % endfor
</ul> </ul>
% endif % endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment