Skip to content

Commit

Permalink
A render operation for the site server
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed May 26, 2024
1 parent 1a0181e commit 5e50bdd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/transom/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,12 @@ def __init__(self, request, client_address, server, directory=None):
super().__init__(request, client_address, server, directory=server.site.output_dir)

def do_POST(self):
if self.path == "/STOP":
if self.path == "/RENDER":
self.server.site.render()
elif self.path == "/STOP":
self.server.shutdown()
else:
raise Exception()

self.send_response(_http.HTTPStatus.OK)
self.end_headers()
Expand Down

0 comments on commit 5e50bdd

Please sign in to comment.