In django 2, path is used instead of url.
Essence of the question. How to use the path to make a request on the form domain.test / topic / 1
With the help of url this is done like this: url(r'^topic/(?P<pk>\d+)/$', topic, name='topic')
In views, along with the request, we accept pk and everything works.
How to do this with path? And what you need to pass in the views.
PS Just starting to learn Python and django.