Templating with Flask

I continued today my journey through Flask, still using the Flask Mega-Tutorial. I got the importance of creating Mock objects as you don't want to have to build in detail all parts of your applications when you are starting it. Templating was also something very fun to learn. Once you get that only what is in enclosed in {{ ... }} sections is dynamic, is easy to get.

What I did:

  • Created a mock user
  • Created template file in subsequent app/templates directory
  • Modified my routes.py file to take into account the change
    • Used the function render_template
    • render the template by running my web server
  • Setup first conditional statements with {% ... %} blocks.

I updated my Flask notebook here.

Preparing the next podcast episode

I spent the rest of the working day editing sound. We have a podcast episode to publish this Monday and I am in charge of the full edit. The recording was particularly long so it's even more work than usual. I am 30% done, hopefully will finish this Friday. To edit I use a DAW[1] called Reaper. There was a steep curve learning about it and voice audio-editing in general, however it was worth it. I will create also a notebook about that pretty soon.

Cool commands learned

Em-dash directly with Ctrl+Shift+U, then 2 0 1 4 and Enter (source)

  1. Digital Audio Workstation ↩︎

Show Comments