Performance

2015


Reviews of two recent Django Books

Dan Poirier

Introduction

When I started building sites in Django, I learned the basics from the excellent Django tutorial. But I had to learn by trial and error which approaches to using Django’s building blocks worked well and which approaches tended to cause problems later on. I looked for more intermediate-level documentation, but beyond James Bennett’s Practical Django Projects and our Karen Tracey’s Django 1.1 Testing and Debugging, there wasn’t much to be found.

2014


Using Amazon S3 to Store your Django Site's Static and Media Files

Dan Poirier

Editor's note: This post was updated in September 2017.

Using Amazon S3 to Store your Django Site's Static and Media Files

Storing your Django site's static and media files on Amazon S3, instead of serving them yourself, can improve site performance. It frees your servers from handling static files themselves, lets you scale your servers easier by keeping media files in a common place, and is a necessary step to using Amazon CloudFront as a Content Delivery Network (CDN).

2011


Bulk inserts in Django

Dan Poirier

I recently found a way to speed up a large data import far more than I expected.

The task was to read data from a text file and create data records in Django, and the naive implementation was managing to import about 55 records per second, which was going to take far too long given the amount of data that needed to be imported.