make it working for django 1.5

Make this example working for django 1.5