critical edit page update
This commit is contained in:
@@ -909,7 +909,7 @@ def edit_page(pid):
|
||||
content = request.form["content"]
|
||||
title = request.form["title"]
|
||||
|
||||
db.execute("UPDATE pages SET content=(?), title=(?)",(content, title))
|
||||
db.execute("UPDATE pages SET content=(?), title=(?) WHERE id=(?)",(content, title, pid))
|
||||
db.commit()
|
||||
|
||||
page = db.execute("SELECT * FROM pages WHERE id=(?)",(pid,)).fetchone()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<hr>
|
||||
|
||||
{% for page in pages %}
|
||||
<p>{{page[1]}} - <a href="{{ url_for('manage.edit_page', pid=page[0]) }}">Edit Page</a> ☆ <a href="{{ url_for('manage.delete_page', pid=page[0]) }}">Delete Page</a></p>
|
||||
<p><a href="{{ url_for('home.custom_page', pid=page[0]) }}">{{page[1]}}</a> - <a href="{{ url_for('manage.edit_page', pid=page[0]) }}">Edit Page</a> ☆ <a href="{{ url_for('manage.delete_page', pid=page[0]) }}">Delete Page</a></p>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user