compatibility mode with django 1.3