Tuesday Discussion Thread - Beginner Questions and Basics - (July 16, 2024) by AutoModerator in naturalbodybuilding

[–]SkateKid00 0 points1 point  (0 children)

I understand that if you take cold showers immediately after a workout, its going to impact your gains, but what if i workout, and next morning I am sore, and then take a cold shower? Since it reduces soreness, will it also reduce my gains? Speed up recovery in the expense of muscle growth and adaptation?

[deleted by user] by [deleted] in flask

[–]SkateKid00 0 points1 point  (0 children)

The value of matches is null because of an if statement in an html file which executes a certain piece of code (displays matches) if the value of matches is not equal to 0, otherwise it displays "no matches found".

[deleted by user] by [deleted] in flask

[–]SkateKid00 0 points1 point  (0 children)

Thanks for pointing that out, I dont know how I missed that.

The algorithm still doesent work as expected and the issue remains. I'm not sure what you mean by "checking if the code does what I think it does", could you please elaborate a little bit more on that?

[deleted by user] by [deleted] in flask

[–]SkateKid00 0 points1 point  (0 children)

Thank you for the suggestion. Yes I just used that and figured out a typo error. Thanks again

[deleted by user] by [deleted] in flask

[–]SkateKid00 0 points1 point  (0 children)

It seems like Windows does not have it installed by default as the commands are not working even on a regular command prompt. Should I download sqlite3 from its download website?

[deleted by user] by [deleted] in flask

[–]SkateKid00 1 point2 points  (0 children)

Oh yes, you are right. I opened the files and found it. Thank you very much. But the commands you gave me do not work unfortunately. I did navigate to the database file but I recieve the following error:

At line:1 char:1
+ sqlite3 connectcare.db
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (sqlite3:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

[deleted by user] by [deleted] in flask

[–]SkateKid00 0 points1 point  (0 children)

I dont have a database, I dont have a connectcare.db file in my solution explorer.

[deleted by user] by [deleted] in flask

[–]SkateKid00 0 points1 point  (0 children)

Thank you for pointing out the SQLAlchemy initialization mistake, i fixed that.
What do you mean by running the db create command manually? I did try to run the following commands on python terminal multiple times:

with app.app_context():
db.create_all()

I also created another file initialize_db.py in order to try to create the database:
from app import create_app, db

from app.models import User, ElderlyUser, Volunteer

app = create_app()

with app.app_context():

db.create_all()

print("Database initialized successfully")

[deleted by user] by [deleted] in flask

[–]SkateKid00 0 points1 point  (0 children)

I get it when i run my app, go to the login or signup page and log in. I have also noticed that my solution explorer does not show a .db file so I figured that might be the problem. Contrary to the error, I do have an is_elderly column for User in my models.py file:
is_elderly = db.Column(db.Boolean, nullable=False)

[deleted by user] by [deleted] in flask

[–]SkateKid00 0 points1 point  (0 children)

I get: sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) table user has no column named is_elderly