      path('needsquoting#/', views.empty_view),
      # Accepts paths with two leading slashes.
      re_path(r'^(.+)/security/$', views.empty_view),
  ]
 
</s> remove     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.
 </s> add     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. </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)
    # Should not append slash.
    path('sensitive_fbv/', views.sensitive_fbv),
    path('sensitive_cbv/', views.SensitiveCBV.as_view()),
      path('needsquoting#/', views.empty_view),
      # Accepts paths with two leading slashes.
      re_path(r'^(.+)/security/$', views.empty_view),
    # Should not append slash.
    path('sensitive_fbv/', views.sensitive_fbv),
    path('sensitive_cbv/', views.SensitiveCBV.as_view()),
  ]
keep keep add keep
 Fixed #32124 -- Added per-view opt-out for APPEND_SLASH behavior. 
tests/middleware/urls.py