加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
handler.py 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
mason101 提交于 2020-06-24 14:08 . 1.0完整代码上传
from views.blog import PostView, TagView, IndexView, CommentView
from views.management import AuthorLoginView, AuthorView, ManagementView, PostManageView, CategoryManageView, \
TagManageView
handlers = [
# 后台管理
(r"/author/login", AuthorLoginView.LoginHandler),
(r"/author/logout", AuthorLoginView.LogoutHandler),
(r"/author/info", AuthorView.AuthorHandler),
(r"/manage/index", ManagementView.IndexHandler),
(r"/manage/post", PostManageView.PostHandler),
(r"/manage/post/detail/(.*)", PostManageView.PostDetailHandler),
(r"/manage/write_post", PostManageView.NewPostHandler),
(r"/manage/category", CategoryManageView.CategoryHandler),
(r"/manage/tags", TagManageView.TagHandler),
(r"/api/index_data", ManagementView.IndexHandler),
(r"/api/update_author_info", AuthorView.AuthorHandler),
(r"/api/new_post", PostManageView.NewPostHandler),
(r"/api/post_data", PostManageView.PostHandler),
(r"/api/update_post", PostManageView.PostDetailHandler),
(r"/api/del_post", PostManageView.PostHandler),
(r"/api/category_data", CategoryManageView.CategoryHandler),
(r"/api/new_category", CategoryManageView.CategoryHandler),
(r"/api/update_category", CategoryManageView.CategoryHandler),
(r"/api/del_category", CategoryManageView.CategoryHandler),
(r"/api/tag_data", TagManageView.TagHandler),
(r"/api/new_tag", TagManageView.TagHandler),
(r"/api/update_tag", TagManageView.TagHandler),
(r"/api/del_tag", TagManageView.TagHandler),
# 博客
(r"/", PostView.PostIndexHandler),
(r"/blog/(.*)", PostView.PostDetailHandler),
(r"/comment/list", CommentView.CommentHandler),
(r"/api/add_comment", CommentView.CommentHandler),
(r".*", IndexView.OtherHandler),
]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化