in Flask

Configuration settings

I realized today that I need to add a few features to my Flask Casts site and quickly ran into a couple of different issues. One, I never really considered making changes to the site once deployed. Being an extreme newbie shines through once again. During development I used the git features that are built into pycharm to push the project to GitHub. I work off a couple of different machines usually so this made things pretty nice. I could just click a couple buttons to pull the changes and push and done. There were a lot of things I hadn’t considered. One being the secret key needed for flask sessions. At the moment I have a different key on my production code than what is in the repo. I manually changed this via ssh and reloaded my application. This works but now when I want to push or pull to the production server I am getting things a little mixed up.

My fix is to set up an environment variable to hold the key itself… Of course it’s something I’ve never really done before but you learn something new every day.  I am having some difficulty getting this to work and simply don’t have the time to sit down and work on it tonight. An issue for tomorrow I suppose.

Write a Comment