cleanup
This commit is contained in:
@@ -87,7 +87,7 @@ class PathHandle:
|
||||
|
||||
with open(local_filename, 'wb') as f:
|
||||
for chunk in r.iter_content(chunk_size=1024):
|
||||
if chunk: # filter out keep-alive new chunks
|
||||
if chunk: # filter out keep-alive new chunks
|
||||
f.write(chunk)
|
||||
f.flush()
|
||||
print(local_filename)
|
||||
|
@@ -97,7 +97,7 @@ class DirectoryAPI(Resource):
|
||||
|
||||
def __init__(self):
|
||||
parser = reqparse.RequestParser()
|
||||
#parser.add_argument('rate', type=int, help='Rate cannot be converted')
|
||||
# parser.add_argument('rate', type=int, help='Rate cannot be converted')
|
||||
parser.add_argument('path', type=str)
|
||||
args = parser.parse_args()
|
||||
super(DirectoryAPI, self).__init__()
|
||||
|
@@ -28,11 +28,11 @@ def _list_items(view, context, model, name):
|
||||
'<div class="select2-container-multi">'
|
||||
'<ul class="select2-choices" style="border:0;cursor:default;background:none;">%s</ul></div>' % (
|
||||
''.join(['<li class="select2-search-choice" style="padding:3px 5px;">'
|
||||
'<div>' + item.name + '</div></li>' for item in getattr(model, name)] )))
|
||||
'<div>' + item.name + '</div></li>' for item in getattr(model, name)])))
|
||||
|
||||
|
||||
def _list_thumbnail(view, context, model, name):
|
||||
if not getattr(model,name): # model.name only does not work because name is a string
|
||||
if not getattr(model, name): # model.name only does not work because name is a string
|
||||
return ''
|
||||
return ''
|
||||
# return Markup('<img src="%s">' % url_for('static',
|
||||
|
Reference in New Issue
Block a user