Blog / Software Development

EZ Price Alerts: A Django app for tracking Amazon prices

December 28, 2014

EZ Price Alerts

A friend and I started working on this project a few weeks ago as we were talking about the holidays and how useful it would be to build an app to track prices of products on Amazon.com. We know Amazon is very competitive with their pricing and their prices for certain products could change many times a day to match competitors'. Having an app to send you alerts when a product reaches your desired price …

Adding drag and drop image uploads to your Django site in 5 minutes with DropzoneJS

November 28, 2014

I've been using the Django admin to upload images to my site one-by-one for a few weeks now and I've finally decided I've had enough of it and started looking for a Javascript library that will enable me to do bulk uploads.

I still have around 100 or so albums and at least 1,000 more pictures to upload so you can just imagine how tedious that would be. I found this library called DropzoneJS that …

Migrating a Django app from MySQL to PostgreSQL

November 6, 2014

We just finished migrating the database for our Django 1.6 app from MySQL to PostgreSQL. If you have a clean environment this process is as simple as running syncdb and/or migrate to create the tables, truncating the data in those tables, and running the dumpdata and loaddata management commands.

Here are the steps to do this:

Step 1: Create an empty database in your PostgreSQL instance

CREATE DATABASE dbname OWNER rolename;

Step 2: Create a …

New Blog Redesign: Now in Django 1.7!

November 1, 2014

I've finally gotten around redesigning my blog and making it more mobile friendly. This is the third redesign for this blog since I started it back in January 2008.

I decided to completely redo it this time, moving away from the WordPress/PHP/MySQL stack to Django/Python/PostgreSQL. Feels much cleaner and runs a lot faster.

Since I just wanted something simple, I wrote the backend myself instead of relying on existing Django apps out there such as …

How to make images responsive by default in Twitter Bootstrap 3

July 23, 2014

I'm currently working on a simple blog app in Django and noticed that my images are not getting resized by default when using Bootstrap 3.

To change this behavior, simply change the img tag in bootstrap.css to this:

img {
  display: inline-block;
  height: auto !important;
  max-width: 100%;
  border: 0;
}

Source