diff --git a/server.py b/server.py index b1f06f4..c19fbee 100644 --- a/server.py +++ b/server.py @@ -39,3 +39,8 @@ def show(id): parent=cursor.fetchone() cursor.execute('SELECT * FROM items WHERE parent_id=%s',[id]) return render_template('show.html', parent=parent, cursor=cursor) + +@app.get('//edit') +def edit(id): + cursor.execute('SELECT * FROM items WHERE id=%s', [id]) + return render_template('edit.html', item=cursor.fetchone()) diff --git a/templates/edit.html b/templates/edit.html new file mode 100644 index 0000000..a3ba590 --- /dev/null +++ b/templates/edit.html @@ -0,0 +1,22 @@ + + + + + + + + +
+

Edit {{item[1]}}

+
+ + + + +
+
+
+ To Index +
+ + diff --git a/templates/show.html b/templates/show.html index b230839..1c65efe 100644 --- a/templates/show.html +++ b/templates/show.html @@ -36,7 +36,12 @@
- To Index +