cleanup
This commit is contained in:
@@ -87,7 +87,7 @@ class PathHandle:
|
|||||||
|
|
||||||
with open(local_filename, 'wb') as f:
|
with open(local_filename, 'wb') as f:
|
||||||
for chunk in r.iter_content(chunk_size=1024):
|
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.write(chunk)
|
||||||
f.flush()
|
f.flush()
|
||||||
print(local_filename)
|
print(local_filename)
|
||||||
@@ -137,7 +137,7 @@ class Application(tk.Frame):
|
|||||||
pass
|
pass
|
||||||
"""
|
"""
|
||||||
for row in range(100):
|
for row in range(100):
|
||||||
tk.Label(self.frame, text="%s" % row, width=3, borderwidth="1",
|
tk.Label(self.frame, text="%s" % row, width=3, borderwidth="1",
|
||||||
relief="solid").grid(row=row, column=0)
|
relief="solid").grid(row=row, column=0)
|
||||||
t="this is the second colum for row %s" %row
|
t="this is the second colum for row %s" %row
|
||||||
tk.Label(self.frame, text=t).grid(row=row, column=1)
|
tk.Label(self.frame, text=t).grid(row=row, column=1)
|
||||||
|
@@ -97,7 +97,7 @@ class DirectoryAPI(Resource):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
parser = reqparse.RequestParser()
|
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)
|
parser.add_argument('path', type=str)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
super(DirectoryAPI, self).__init__()
|
super(DirectoryAPI, self).__init__()
|
||||||
|
@@ -28,11 +28,11 @@ def _list_items(view, context, model, name):
|
|||||||
'<div class="select2-container-multi">'
|
'<div class="select2-container-multi">'
|
||||||
'<ul class="select2-choices" style="border:0;cursor:default;background:none;">%s</ul></div>' % (
|
'<ul class="select2-choices" style="border:0;cursor:default;background:none;">%s</ul></div>' % (
|
||||||
''.join(['<li class="select2-search-choice" style="padding:3px 5px;">'
|
''.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):
|
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 ''
|
return ''
|
||||||
# return Markup('<img src="%s">' % url_for('static',
|
# return Markup('<img src="%s">' % url_for('static',
|
||||||
|
Reference in New Issue
Block a user