How to structure Flask applications part 2 - Growing up

Posted on Fri 16 October 2020 in python • Tagged with python, flask, webdev

My first introduction to Flask was Miguel Grinberg's original Flask Megatutorial. After using Django as my framework of choice for several years. Miguel's simple use of Flask allowed me to see just far enough under the hood that I started understanding much more of the web stack, hidden in some …


Continue reading

How to structure Flask applications part 1 - Small Apps

Posted on Fri 02 October 2020 in python • Tagged with python, flask, webdev

One of the benefits of using Flask is it is straightforward to get an application up and running. When you are first starting, you can create your application with a single file. The structure of the application is left entirely up to the developer.

Starting with a single file application …


Continue reading

Building Dynamic Web Applications with Python primer

Posted on Fri 18 September 2020 in python • Tagged with python

If you are a full-stack developer, whether you like it or not, you are going to use Javascript. It's an incredible language that allows developers to create dynamic applications. The amount of Javascript you use is up to you. Javascript can be used to power an entire application or it …


Continue reading

Pelican static site on Netlify

Posted on Tue 14 May 2019 in python • Tagged with python, pelican, static, netlify

Setup the project

$ mkdir pelican-netlify-cms && cd $_

# create and activate a virtual environment for your project, for example:
$ python -m venv venv
$ source venv/bin/activate

Create a requirements.txt file. This is important as Netlify will look for this file to determine dependencies. In the file:

pelican …

Continue reading

Setting up Less CSS with Django

Posted on Thu 23 January 2014 in Python • Tagged with less, django, css

I recently started using Less Css with Django, after using it briefly I found that I did not want to manually compile Less after making changes during development. Using this approach I am able to compile Less client-side during development and have django-compressor compile server-side on live site.

1. Install …


Continue reading

South migration - table already exists

Posted on Tue 24 September 2013 in Python • Tagged with python, django, south

I was recently adding a slug field to a model in a Django application when I ran into this error when doing the South migration:

Error in migration: test_app:0002_auto__add_field_category_slug
DatabaseError: table "_south_new_test_app_category" already exists

When South makes changes to an existing table, it creates a new table with a …


Continue reading