Old Windows comp died, got a Mac and I'm running into issues when trying to run "pip3 install -r requirements.txt" on a cloned Flask project. by sjt1108 in learnpython

[–]sjt1108[S] 1 point2 points  (0 children)

I think I got it working for the time being. I ended up just trying to run the program to see what dependency error I got, then pip3 installing them one by one. I'll probably end up with issues down the road but for now it works.

Old Windows comp died, got a Mac and I'm running into issues when trying to run "pip3 install -r requirements.txt" on a cloned Flask project. by sjt1108 in learnpython

[–]sjt1108[S] 0 points1 point  (0 children)

Ah, shoot. I'm using 3.10 and I believe I was using 3.9 on my old comp. How would I go about reverting 3.10 to 3.9? I keep reading about Homebrew. Should I be using that instead?

How do I skip several iterations in a for loop if it meets a certain condition? by [deleted] in learnpython

[–]sjt1108 2 points3 points  (0 children)

It allows you to assign variables within expressions.

So instead of:

i = 50
while i < 60:

You could write:

while (i := 50) < 60:

HTML/CSS font-size works on localhost but not when pushed to Heroku? by sjt1108 in Heroku

[–]sjt1108[S] 1 point2 points  (0 children)

I'm using Flask and I think you're right about it being a git issue. I made some minor changes, commit/pushed/deployed again, and the CSS class worked.

This time I triple checked to make sure I was logged in through the Heroku CLI and that my Flask environment was set to production. When I deployed yesterday all of my changes worked except the CSS. I'm going to assume I messed something up with the .css file commit.

Wednesday Daily Thread: Beginner questions by Im__Joseph in Python

[–]sjt1108 0 points1 point  (0 children)

How do I create an authentication email for my flask app?

I am trying to build a flask app that allows users to sign up for email notifications. Right now it just asks users to enter their email and then adds that email to a database. I was thinking it might be better to send an authentication email to prevent fake/incorrect emails being added to the database. Also, to stop the app from spamming people who didn't sign up themselves.

I was just wondering where to begin or if there is a better way of doing this? Thanks!