diff options
author | ubq323 <ubq323> | 2021-06-09 22:25:25 +0000 |
---|---|---|
committer | ubq323 <ubq323> | 2021-06-09 22:25:25 +0000 |
commit | da82578b625dbe5c50d6ba228919cf7e0b585043 (patch) | |
tree | 2bd45d2502dbc1ad52cbb8869e065efc0119b2eb | |
parent | b85a4e185a9ca96b5b6f0f492326e556e0d63040 (diff) |
update db things
-rw-r--r-- | apioforum/db.py | 4 | ||||
-rw-r--r-- | apioforum/thread.py | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/apioforum/db.py b/apioforum/db.py index 9db27db..b138aae 100644 --- a/apioforum/db.py +++ b/apioforum/db.py @@ -42,6 +42,10 @@ CREATE TABLE posts ( CREATE INDEX posts_thread_idx ON posts (thread); """, +""" +ALTER TABLE posts ADD COLUMN edited INT NOT NULL DEFAULT 0; +ALTER TABLE posts ADD COLUMN updated TIMESTAMP; +""", ] def init_db(): diff --git a/apioforum/thread.py b/apioforum/thread.py index 23e3cf2..d64055a 100644 --- a/apioforum/thread.py +++ b/apioforum/thread.py @@ -105,9 +105,3 @@ def edit_post(post_id): return render_template("edit_post.html",post=post) -@bp.route("/test") -def test(): - a = "<link rel=stylesheet href=/static/style.css>" - for i in range(1,17): - a += f'<span class="post-heading-em un-col-{i}">apiobee {i}</span><br>' - return a |