Restored Django < 1.4.2 compatibility