Avoid deprecation warning for django 1.5