I am using django2.0 and would like to convert the format of the urls.py from this to
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.post_list , name='post_list'),
url(r'^(?P<slug>[\w-]+)/$', views.post_detail, name="detail"),
url(r'^category/(?P<hierarchy>.+)/$', views.show_category, name='category'),
]
something similar to this:
from django.urls import path
from . import views
app_name='home'
urlpatterns = [
path('', views.post_list, name='post_list'),
path(<slug:slug>/, views.post_detail, name="detail"),
path(???),
]
How should I code the last line in the new format. Thank you for any help rendered.