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.
 

15 lines
819 B

from django.urls import re_path as url
from . import views
from django.urls import path
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path ('', views.post_list, name='community'), # 首页就是帖子列表
path('create_post/', views.create_post, name='create_post'), # 专用于发布逻辑
path ('post_list/', views.post_list, name='post_list'), # 浏览已发布帖子
path('like_post/<int:post_id>/', views.like_post, name='like_post'), # 点赞帖子
path('comment_post/<int:post_id>/', views.comment_post, name='comment_post'), # 评论帖子
path('favorite_post/<int:post_id>/', views.favorite_post, name='favorite_post'), # 收藏帖子
path('toggle_follow/<int:user_id>/', views.toggle_follow, name='toggle_follow'), # 关注
]