Ian Lewis
May 15, 2017
In a previous post I wrote about Kubernetes health checks. Since I'm a Python developer and a fan, I went about implementing it in Django. Health checks are a great way to help Kubernetes help your app to have high availability, and that include[...]
July 21, 2015
The normal way to test Django views is via the test client. The test client fakes being a wsgi server and actually makes an HTTP request through all of Django’s request routing machinery. There are a number of reasons why this isn’t an ideal app[...]
Feb. 11, 2013
I recently came across one feature of Django that seemed pretty useful for one off projects and customizations and was startled because it's one of Django's least mentioned features.
March 25, 2012
Recently there have been a lot of conversations on the Django mailing list about fixing the auth module. Here are some of the recent mailing list threads: 1. authentication by email 2. auth.User refactor: reboot 3. auth.User: The abstract[...]
Nov. 15, 2010
The other day I released bpssl which is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view '/login' is[...]
March 2, 2010
I came across a little annoyance in Django today. I found that ForeignKeys that reference 'self', i.e. they point to the same table, always result in a join in a filter. Take this normal foreign key reference. class Customer(models[...]
March 1, 2010
This is cool Django application from Yasushi Masuda which allows you to render data to a pdf using trml2pdf. template2pdf provides a generic view called direct_to_pdf which will render a rml template directly to pdf. # coding: utf-8 [...]
Dec. 13, 2009
Running django fastcgi with daemontools is rather easy but getting it to run in the foreground with the proper user takes a bit of knowledge about how bash works and the tools in daemontools. In order to run the fastcgi daemon in the foreground[...]
Nov. 18, 2009
Django's development server doesn't normally support HTTPS so it's hard to test applications with HTTPS without deploying the application to a real web server that supports HTTPS. The secret is to use two development server instances, one for ht[...]
Oct. 21, 2009
My good friend Takashi Matsuo wrote an interesting blog about start up times of various frameworks on appengine. Because appengine kills your server process it often needs to load your application into memory from scratch. This can take a lot of[...]