I am currently learning Django. Until now I was working with Django 1.1 but now I am working with Django 2.0. Django 2.0 uses path() instead of url() and I don't quiet understand that.
In Django 1.1 my urls looked like this:
url(r'^about/$', views.AboutView.as_view(), name='about'),
Now with Django 2 it looks like this
path('about/', views.AboutView.as_view(), name='about'),
So far so good but I just don't undertand how I can convert this
url(r'^post/(?P<pk>\d+)$', views.PostDetailView.as_view(),
name='post_detail'),
So that it works with the new version. Just chagning url to path doesn't work, and changing url to re_path doesn't work either. Can someone help me with that Problem?
Thanks in advance