Fixing import error for django versions older than 1.5