chiark / gitweb /
ersatz fake-dw gets a front page, for completeness
authorMarnanel Thurman <marnanel@thurman.org.uk>
Sun, 5 Dec 2021 00:29:16 +0000 (00:29 +0000)
committerMarnanel Thurman <marnanel@thurman.org.uk>
Sun, 5 Dec 2021 00:29:16 +0000 (00:29 +0000)
fake-dw/fake-dw.py
fake-dw/templates/front-page [new file with mode: 0644]

index 9b80c8e42c6899cbb0d28c94cb82e5a9a545d1c7..00c4e94e1ac86992582743221c5b0870ae6bc930 100644 (file)
@@ -146,7 +146,11 @@ class ErsatzHandler(http.server.BaseHTTPRequestHandler):
             print('Query -->', query)
             print('Headers -->', self.headers)
 
-        if self.path=='/login':
+        if self.path=='/':
+
+            fields['template-name'] = 'front-page'
+
+        elif self.path=='/login':
 
             if method=='GET':
 
diff --git a/fake-dw/templates/front-page b/fake-dw/templates/front-page
new file mode 100644 (file)
index 0000000..d85085e
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<title>ersatz fake-dw</title>
+</html>
+<body>
+<h1>ersatz fake-dw</h1>
+<p>If you see this, the ersatz fake-dw daemon is running properly.</p>
+
+<p>If you want to know more about that, see
+<a href="https://gitlab.com/marnanel/dwim">dwim's documentation</a>.
+</p>
+
+</body></html>