bug fixes
This commit is contained in:
5
shop.py
5
shop.py
@@ -203,7 +203,10 @@ def edit_md():
|
||||
backup=data_file+".bkp"
|
||||
copyfile(data_file, backup)
|
||||
contents_file=open(data_file,'wt')
|
||||
for row in request.form['edit_md'].split("\n"):
|
||||
contents_list=request.form['edit_md'].split("\n")
|
||||
while contents_list[-1].strip()=='':
|
||||
contents_list.pop()
|
||||
for row in contents_list:
|
||||
contents_file.write("%s\n"%row.encode('utf-8'))
|
||||
contents_file.close()
|
||||
flash('Saved new file.')
|
||||
|
||||
@@ -8,7 +8,7 @@ textarea { border: 2px solid #ccc; }
|
||||
input[type=text]{ border: 2px solid #ccc; }
|
||||
|
||||
.submit { font-family: monospace; }
|
||||
.tickbox { margin-right: 0.5em; width:2em; }
|
||||
.tickbox { margin-right: 0.5em; width:2em; height:1.8em; }
|
||||
.iconbox { margin-right: 0.5em; width: 1.5em; cursor: pointer;
|
||||
font-size:1.5em; color:#377ba8; }
|
||||
.noitem { background-color: transparent; border-color:transparent; }
|
||||
|
||||
Reference in New Issue
Block a user