NASA POTD and learning Flask
I am slowly learning python. I am my own worst enemy though because I am so easily distracted. I had no idea what a 'framework' was or why I even needed one when I can happily code a way in ultra basic html like this page and be a happy little clam with the results.
Of course when I found out about Flask, I was intrgued becuase it allows python to pass data into html and much much more. Ill drop a link at the end if you want to read more about Flask (you should, its excellent and the explination is much better than what I can tell you!)
So I had this idea of using a free api key from NASA to pull their picture of the day and display it on a website then collect a nice archive so anyone that missed a day could see it again. With the help of Gemini, I got the code working. Im at the stage where I know want I want, I can build the scaffold and some of the main code but my knowledge runs out way before my ideas, and thats where my AI buddy comes to the rescue.
I dont copy paste unless I absolutley have to, even then I type the code myself (a trick from the simpler times, when you typed games in from magazines. Do that enough times and stuff starts to stick) and once it runs I review the code and add comments to each line to see if I have understood it. Anyway, The site is hosted on 'pythonanywhere' because Im told neocities cant host flask.
It took a few false starts and some server 500 errors (I forgot about case sensitivity!) but it is now up and running and the picture changes daily, the archive updates automatically, Im so pleased with it.
Here is the new NASA POTD site.(Might take a sec to load, its pulling stuff from NASA)Flask information.
Flask Tutorial