I need to convert the following regular expression using url() method to path() method.
url(r'^(?P<pk>[-\w]+)/$')
Thanks and regards.
try one of the patterns
path('<int:pk>/') # or path('<slug:pk>/')