From 12d915c476880613fe35a2a1b163adac31528452 Mon Sep 17 00:00:00 2001 From: grgr Date: Tue, 27 Sep 2022 17:15:34 +0200 Subject: [PATCH] log diary comment and small edit in createNewTable function --- library.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/library.py b/library.py index 37acea5..caee4f4 100644 --- a/library.py +++ b/library.py @@ -18,7 +18,7 @@ def createNewTable(tab_name): print(f'connected to library.db') table = f'''CREATE TABLE {tab_name} - (author, title, description) + (topic) ''' cursor.execute(table) print(f'table {tab_name} created successfully') @@ -245,3 +245,10 @@ app.run(port=3148) # I personally do strongly recommend you use a virtualenv, because it makes it much, much easier to swap out versions of libraries and not affect other Python projects." # https://stackoverflow.com/questions/32756711/is-it-necessary-to-use-virtualenv-to-use-flask-framework + + +# 27/06/22 +# I'm not sure how to continue at this point so I decided to check some tutorials and go through the steps they make, to understand some other good practices for databases. +# https://www.digitalocean.com/community/tutorials/how-to-use-one-to-many-database-relationships-with-flask-and-sqlite +# https://www.digitalocean.com/community/tutorials/how-to-modify-items-in-a-one-to-many-database-relationships-with-flask-and-sqlite +# https://www.digitalocean.com/community/tutorials/how-to-use-many-to-many-database-relationships-with-flask-and-sqlite