Blog / Tech

Deploying your Django app with Fabric

January 25, 2014

I’ve been making quite a bit of improvements and changes to my Django app, GlucoseTracker, lately that the small amount of time I spent creating a deployment script using Fabric had already paid off.

Fabric is basically a library written in Python that lets you run commands on remote servers (works locally as well) via SSH. It’s very easy to use and can save you a lot of time. It eliminates the need to …

A simple Python script for backing up a PostgreSQL database and uploading it to Amazon S3

January 10, 2014

Here’s a very simple Python script I currently use to create a compressed PostgreSQL database backup for my Django app. Since my database is very small and I don’t see it becoming big anytime soon, I create the backup locally and send a copy to Amazon S3.

To keep it very simple, I have it set to do hourly backups for 24 hours and daily backups for 1 year (365 days). For the hourly …

Using command aliases in Ubuntu 13.04

January 1, 2014

I’ve been spending a lot of time working on a project lately where I found myself having to use some commands over and over. It’s gotten to a point where I decided to create some scripts to execute the commands for me. But then even calling the scripts started to become tedious that I created short bash command aliases to execute them instead.

If you’re using the bash shell, all you have to do is …

Launching a new Django project: GlucoseTracker

January 1, 2014

I finally launched a project I’ve been working on the last couple of months just in time for the new year. It’s a web application for tracking blood glucose levels using all open source software: Python, Django, Twitter Bootstrap 3, PostgreSQL, Nginx, Gunicorn, and a bunch of others.

I originally started this project over 2 years ago to teach myself how to use the Django web framework, but I lost interest at some point …