You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
536 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#coding=utf-8
from django.urls import path, re_path
from . import views # 确保从当前目录导入views模块前面的import语句有误
urlpatterns = [
path('', views.queryAll, name='home'),
re_path(r'^page/(?P<num>\d+)$', views.queryAll, name='pagination'),
re_path(r'^post/(?P<postid>\d+)$', views.detail, name='post_detail'),
re_path(r'^category/(?P<cid>\d+)$', views.queryPostByCid, name='category_posts'),
re_path(r'^archive/(?P<year>\d+)/(?P<month>\d+)$', views.queryPostByCreated, name='archive'),
]