import views from django.conf.urls import url urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^post/(?P<token>\d+)/$', views.detail, name='detail'), ]