'Return True if settings.APPEND_SLASH is True and appending a slash to
the request path turns an invalid path into a valid one.'

def should_redirect_with_slash(self, request):

    if (settings.APPEND_SLASH and (not request.path_info.endswith('/'))):
        urlconf = getattr(request, 'urlconf', None)
        return ((not is_valid_path(request.path_info, urlconf)) and is_valid_path(('%s/' % request.path_info), urlconf))
    return False
