  
  
  def is_valid_path(path, urlconf=None):
      """
      Return True if the given path resolves against the default URL resolver,
      False otherwise. This is a convenience method to make working with "is
      this a match?" cases easier, avoiding try...except blocks.
      """
      try:
          resolve(path, urlconf)
          return True
      except Resolver404:
 
</s> remove         resolve(path, urlconf)
        return True
 </s> add         return resolve(path, urlconf) </s> remove             return (
                not is_valid_path(request.path_info, urlconf) and
                is_valid_path('%s/' % request.path_info, urlconf)
            )
 </s> add             if not is_valid_path(request.path_info, urlconf):
                match = is_valid_path('%s/' % request.path_info, urlconf)
                if match:
                    view = match.func
                    return getattr(view, 'should_append_slash', True)
    Return the ResolverMatch if the given path resolves against the default URL
    resolver, False otherwise. This is a convenience method to make working
    with "is this a match?" cases easier, avoiding try...except blocks.
  
  
  def is_valid_path(path, urlconf=None):
      """
    Return the ResolverMatch if the given path resolves against the default URL
    resolver, False otherwise. This is a convenience method to make working
    with "is this a match?" cases easier, avoiding try...except blocks.
    Return the ResolverMatch if the given path resolves against the default URL
    resolver, False otherwise. This is a convenience method to make working
    with "is this a match?" cases easier, avoiding try...except blocks.
    Return the ResolverMatch if the given path resolves against the default URL
    resolver, False otherwise. This is a convenience method to make working
    with "is this a match?" cases easier, avoiding try...except blocks.
      """
      try:
          resolve(path, urlconf)
          return True
      except Resolver404:
keep keep keep keep replace replace replace keep keep keep keep keep
 Fixed #32124 -- Added per-view opt-out for APPEND_SLASH behavior. 
django/urls/base.py