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.
61 lines
1.7 KiB
61 lines
1.7 KiB
from django.urls import path
|
|
from . import views
|
|
|
|
app_name = 'blog'
|
|
|
|
urlpatterns = [
|
|
path(
|
|
r'',
|
|
views.IndexView.as_view(),
|
|
name='index'),
|
|
path(
|
|
r'page/<int:page>/',
|
|
views.IndexView.as_view(),
|
|
name='index_page'),
|
|
path(
|
|
r'article/<int:year>/<int:month>/<int:day>/<int:article_id>.html',
|
|
views.ArticleDetailView.as_view(),
|
|
name='detailbyid'),
|
|
path(
|
|
r'category/<slug:category_name>.html',
|
|
views.CategoryDetailView.as_view(),
|
|
name='category_detail'),
|
|
path(
|
|
r'category/<slug:category_name>/<int:page>.html',
|
|
views.CategoryDetailView.as_view(),
|
|
name='category_detail_page'),
|
|
path(
|
|
r'author/<author_name>.html',
|
|
views.AuthorDetailView.as_view(),
|
|
name='author_detail'),
|
|
path(
|
|
r'author/<author_name>/<int:page>.html',
|
|
views.AuthorDetailView.as_view(),
|
|
name='author_detail_page'),
|
|
path(
|
|
r'tag/<slug:tag_name>.html',
|
|
views.TagDetailView.as_view(),
|
|
name='tag_detail'),
|
|
path(
|
|
r'tag/<slug:tag_name>/<int:page>.html',
|
|
views.TagDetailView.as_view(),
|
|
name='tag_detail_page'),
|
|
path(
|
|
'archives.html',
|
|
views.ArchivesView.as_view(),
|
|
name='archives'),
|
|
path(
|
|
'links.html',
|
|
views.LinkListView.as_view(),
|
|
name='links'),
|
|
path(
|
|
r'upload',
|
|
views.fileupload,
|
|
name='upload'),
|
|
path(
|
|
r'clean',
|
|
views.clean_cache_view,
|
|
name='clean'),
|
|
path('article/<int:article_id>/like/', views.like_article, name='like_article'),
|
|
path('article/<int:article_id>/like/check/', views.check_like_status, name='check_like_status'),
|
|
] |