django_blog/blog/urls.py
2017-11-05 00:34:26 +03:00

13 lines
478 B
Python

from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.post_list, name='post_list'),
url(r'^(?P<page>[0-9]+)/$', views.post_list, name='post_list'),
url(r'^post/(?P<pk>[0-9]+)/$', views.post_detail, name='post_detail'),
url(r'^new/$', views.post_new, name='post_new'),
url(r'^post/(?P<pk>[0-9]+)/edit/$', views.post_edit, name='post_edit'),
url(r'^tag/(?P<tag>[a-zA-Z]+)/$', views.search_by_tag, name='search_by_tag'),
]