From dcca02c217a6841c3936c4e4b8fe2462e9edd54f Mon Sep 17 00:00:00 2001 From: wes Date: Sun, 18 Jun 2017 12:36:28 -0400 Subject: [PATCH] basic grabbing of posts for editing --- src/posts.py | 3 +++ src/scripts/editor.tag | 30 +++++++++++++++++++++++++++--- src/website.py | 4 ++++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/posts.py b/src/posts.py index 8fa35ad..663f792 100644 --- a/src/posts.py +++ b/src/posts.py @@ -39,3 +39,6 @@ class Posts: }) return jsonify(posts) + + def getpost(self, _id): + return jsonify(self.db[_id]) diff --git a/src/scripts/editor.tag b/src/scripts/editor.tag index 4f40488..9e3c77e 100644 --- a/src/scripts/editor.tag +++ b/src/scripts/editor.tag @@ -2,6 +2,14 @@
+
    +
  • +

    + {title} by {author}, id = {_id} +

    + +
  • +
title author