Commit ab22e47a authored by murtaugh's avatar murtaugh

merge from laptop with rename and delete actions

parents 21e34739 ca5eb6ac
......@@ -2,7 +2,7 @@ Makeserver3 is a relaunch of the makeserver, written specifically to take advant
Requires
* python 3.6
* python 3.5
* aiohttp
......
......@@ -70,7 +70,7 @@ def directory_as_html(filepath, directory, prefix, editor_url=None):
file_url = '/' + urlquote(fp)
target = None
if editable(fp) and editor_url:
file_url = f"{editor_url}#{file_url}"
file_url = "{0}#{1}".format(editor_url, file_url)
target = "editor"
# if file is a directory, add '/' to the end of the name
if os.path.isdir(_file):
......@@ -109,7 +109,7 @@ async def route_get (request):
else:
return web.FileResponse(path, chunk_size=256*1024)
else:
return web.Response(text=f"404 on path {path}")
return web.Response(text="404 on path {0}".format(path))
async def route_post (request):
""" write posted text value to file """
......@@ -137,7 +137,7 @@ async def route_post (request):
resp['delete'] = 'ok'
return web.Response(text=json.dumps(resp), content_type="application/json")
else:
return web.Response(text=f"post not allowed on {path}")
return web.Response(text="post not allowed on {0}".format(path))
active_sockets = []
......@@ -188,4 +188,4 @@ def main ():
if __name__ == "__main__":
main()
\ No newline at end of file
main()
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