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.
ReviewAndAnalyzeOpenSourceS.../doc/mermaid/graph_4.mmd

78 lines
1.6 KiB

---
config:
layout: elk
---
classDiagram
%% 模型类
class Comment {
+body
+creation_time
+last_modify_time
+is_enable
+__str__()
}
%% 表单类
class CommentForm {
+parent_comment_id
}
%% 视图类
class CommentPostView {
+dispatch()
+get()
+form_invalid()
+form_valid()
}
%% 管理类
class CommentAdmin {
+list_display
+list_filter
+actions
+link_to_userinfo()
+link_to_article()
}
%% 应用配置类
class CommentsConfig
%% 测试类
class CommentsTest
%% 工具函数
class utils {
+send_comment_email()
}
%% 继承关系
CommentForm --|> ModelForm
CommentPostView --|> FormView
CommentAdmin --|> ModelAdmin
CommentsConfig --|> AppConfig
CommentsTest --|> TransactionTestCase
%% 关联关系
Comment --> AUTH_USER_MODEL : author
Comment --> Article : article
Comment --> Comment : parent_comment
CommentForm --> Comment : create
CommentPostView --> CommentForm : use
CommentPostView --> Comment : create
CommentAdmin --> Comment : manage
CommentsTest --> Comment : test
%% 依赖关系
CommentPostView ..> BlogUser : import
CommentPostView ..> Article : import
CommentsTest ..> BlogUser : import
CommentsTest ..> Article : import
CommentsTest ..> Category : import
utils ..> Comment : import
CommentAdmin ..> Comment : import
%% 方法调用关系
CommentPostView --> utils : possible_call
CommentsTest --> utils : test_call