Django tutorial code for 1.7