diff --git a/server.py b/server.py index dd009c1..065ce47 100644 --- a/server.py +++ b/server.py @@ -28,9 +28,9 @@ app.wsgi_app = HTTPMethodOverrideMiddleware(app.wsgi_app) def show_all(): cursor.execute('SELECT * FROM items WHERE parent_id IS NULL') if request.cookies.get('movingItemId'): - return render_template('show.html', cursor=cursor, moving_item_id=request.cookies.get('movingItemId')) + return render_template('show.html', children=cursor, moving_item_id=request.cookies.get('movingItemId')) else: - return render_template('show.html', cursor=cursor) + return render_template('show.html', children=cursor) @app.post("/") def create(): @@ -73,9 +73,9 @@ def show(id): parent=cursor.fetchone() cursor.execute('SELECT * FROM items WHERE parent_id=%s',[id]) if request.cookies.get('movingItemId'): - return render_template('show.html', parent=parent, cursor=cursor, moving_item_id=request.cookies.get('movingItemId')) + return render_template('show.html', parent=parent, children=cursor, moving_item_id=request.cookies.get('movingItemId')) else: - return render_template('show.html', parent=parent, cursor=cursor) + return render_template('show.html', parent=parent, children=cursor) @app.get('//edit') def edit(id): diff --git a/templates/show.html b/templates/show.html index 7f737a5..205f39d 100644 --- a/templates/show.html +++ b/templates/show.html @@ -23,7 +23,7 @@

Items

{%endif%}