fix error message for django < 1.4