I am new to django. I was creating forms in django with the help of an online tutorial. I didnot understand a line in the urls.py file. Can someone explain what exactly it means?
from django.conf.urls import url
from . import views
from . views import BlogListView, BlogDetailView, BlogCreateView
urlpatterns = [
url(r'^$', views.BlogListView.as_view(), name='post_list'),
url(r'^post/(?P<pk>\d+)/$', BlogDetailView.as_view(), name='post-detail'),
url(r'^post/new/$', BlogCreateView.as_view(), name='post_new'),
url(r'^post/(?P<pk>\d+)/edit/$', BlogUpdateView.as_view(), name='post_edit'),
]
I did not understand the following line:
url(r'^post/(?P<pk>\d+)/$'
What does (?P<pk>\d+)/$
signify?
Help please