log diary comment and small edit in createNewTable function

master
grgr 2 years ago
parent d300b512b7
commit 12d915c476

@ -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

Loading…
Cancel
Save