A friend called me the other day wanting to learn more about putting together a Flask application. After brewing a good Catimor coffee variety from Dominican Republic I decided to get a sample Flask code for starters and share it with everybody. This Flask application includes: You can save this code to a Python file …
Category Archives: Flask
RuntimeError: working outside of application context in Python Error
I have been working on a personal Flask app using SQLAlchemy for learning purposes and to improve my coding skills. As usual, I put it away for some months and then have to ‘re-learn’ what I did. Don’t do this! 🙂 I kept getting a new (at least for me!) error “RuntimeError: working outside of …
Continue reading “RuntimeError: working outside of application context in Python Error”
Commenting within Jinja2 HTML Template
This one took me a while to find (in my case). I assumed it was not possible and was lazy to look around. But, after wearing my irregular bucket hat I decided to go for it. I found it! and it was very simple. If you need to comment within a Jinja2 template you need …
Python’s built-in HTTP server handy one
While building my own Flask application for learning purposes. I was not sure how it was being served on the web. I did not install Apache of any other web server, but it is running on my Digital Ocean test server. The I found out about Python’s built-in HTTP server. This final purpose of this …
