Fix for django 1.4

Fix #27