Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HelloGitHub-Team/HelloDjango-blog-tutorial
/ types & classes
Types & classes
49 in github.com/HelloGitHub-Team/HelloDjango-blog-tutorial
⨍
Functions
199
◇
Types & classes
49
↳
Endpoints
1
↓ 4 callers
Class
CommentForm
comments/forms.py:6
↓ 3 callers
Class
Highlighter
自定义关键词高亮器,不截断过短的文本(例如文章标题)
blog/utils.py:5
↓ 1 callers
Class
AllPostsRssFeed
blog/feeds.py:6
↓ 1 callers
Class
PostIndex
blog/search_indexes.py:5
Class
AdminTestCase
blog/tests/test_views.py:217
Class
ArchiveView
blog/views.py:24
Class
ArchiveViewTestCase
blog/tests/test_views.py:107
Class
BlogConfig
blog/apps.py:4
Class
BlogDataTestCase
blog/tests/test_views.py:13
Class
BlogExtrasTestCase
blog/tests/test_templatetags.py:19
Class
Category
Django 要求模型必须继承 models.Model 类。 Category 只需要一个简单的分类名 name 就可以了。 CharField 指定了分类名 name 的数据类型,CharField 是字符型, CharField 的 max_length 参数
blog/models.py:29
Class
CategoryModelTestCase
blog/tests/test_models.py:10
Class
CategoryView
blog/views.py:18
Class
CategoryViewTestCase
blog/tests/test_views.py:74
Class
Comment
comments/models.py:5
Class
CommentAdmin
comments/admin.py:5
Class
CommentDataTestCase
comments/tests/base.py:8
Class
CommentExtraTestCase
comments/tests/test_templatetags.py:15
Class
CommentModelTestCase
comments/tests/test_models.py:5
Class
CommentViewTestCase
comments/tests/test_views.py:11
Class
CommentsConfig
comments/apps.py:4
Class
Elasticsearch2IkSearchBackend
blog/elasticsearch2_ik_backend.py:6
Class
Elasticsearch2IkSearchEngine
blog/elasticsearch2_ik_backend.py:16
Class
HighlighterTestCase
blog/tests/test_utils.py:5
Class
IndexView
blog/views.py:11
Class
IndexViewTestCase
blog/tests/test_views.py:46
Class
Meta
blog/models.py:42
Class
Meta
blog/models.py:58
Class
Meta
blog/models.py:107
Class
Meta
comments/forms.py:7
Class
Meta
comments/models.py:13
Class
Migration
blog/migrations/0003_auto_20191011_2326.py:6
Class
Migration
blog/migrations/0001_initial.py:8
Class
Migration
blog/migrations/0002_auto_20190711_1802.py:9
Class
Migration
blog/migrations/0004_post_views.py:6
Class
Migration
comments/migrations/0001_initial.py:8
Class
Migration
comments/migrations/0002_auto_20191011_2326.py:6
Class
Post
文章的数据库表稍微复杂一点,主要是涉及的字段更多。
blog/models.py:66
Class
PostAdmin
blog/admin.py:5
Class
PostDetailView
blog/views.py:42
Class
PostDetailViewTestCase
blog/tests/test_views.py:178
Class
PostModelTestCase
blog/tests/test_models.py:26
Class
RSSTestCase
blog/tests/test_views.py:238
Class
SearchIndexesTestCase
blog/tests/test_models.py:68
Class
SmokeTestCase
blog/tests/test_smoke.py:4
Class
Tag
标签 Tag 也比较简单,和 Category 一样。 再次强调一定要继承 models.Model 类!
blog/models.py:50
Class
TagModelTestCase
blog/tests/test_models.py:18
Class
TagView
blog/views.py:35
Class
TagViewTestCase
blog/tests/test_views.py:145