add
authorMart Lubbers <mart@martlubbers.net>
Wed, 24 Sep 2014 17:55:45 +0000 (19:55 +0200)
committerMart Lubbers <mart@martlubbers.net>
Wed, 24 Sep 2014 17:55:45 +0000 (19:55 +0200)
program/everything/index.py

index 5143402..1c66e28 100644 (file)
@@ -39,10 +39,15 @@ def crawler_edit(req, args, apok):
             status = 'Other exception thrown: {}<br />'.format(e)
         req.write(status)
     elif args['action'] == 'edit':
-        req.write('Edit {}\n'.format(args['name']))
+        cr = crawler.Crawler()
+        req.write('<table>')
+        req.write(''.join(
+            '<tr><td>{}</td><td>{}</td></tr>'.format(a[0], a[1])
+            for a in cr.entries[args['name']]['content']))
+        req.write('</table>')
     else:
         req.write('Unknown editing action: {}'.format(args['action']))
-    req.write('<a href="index.py">Go back</a>')
+    req.write('<br/><a href="index.py">Go back</a>')
     return apok