SYMBOL INDEX (1161 symbols across 132 files) FILE: accounts/admin.py class BlogUserCreationForm (line 11) | class BlogUserCreationForm(forms.ModelForm): class Meta (line 15) | class Meta: method clean_password2 (line 19) | def clean_password2(self): method save (line 27) | def save(self, commit=True): class BlogUserChangeForm (line 37) | class BlogUserChangeForm(UserChangeForm): class Meta (line 38) | class Meta: method __init__ (line 43) | def __init__(self, *args, **kwargs): class BlogUserAdmin (line 47) | class BlogUserAdmin(UserAdmin): FILE: accounts/apps.py class AccountsConfig (line 4) | class AccountsConfig(AppConfig): FILE: accounts/forms.py class LoginForm (line 11) | class LoginForm(AuthenticationForm): method __init__ (line 12) | def __init__(self, *args, **kwargs): class RegisterForm (line 20) | class RegisterForm(UserCreationForm): method __init__ (line 21) | def __init__(self, *args, **kwargs): method clean_email (line 33) | def clean_email(self): class Meta (line 39) | class Meta: class ForgetPasswordForm (line 44) | class ForgetPasswordForm(forms.Form): method clean_new_password2 (line 85) | def clean_new_password2(self): method clean_email (line 94) | def clean_email(self): method clean_code (line 103) | def clean_code(self): class ForgetPasswordCodeForm (line 114) | class ForgetPasswordCodeForm(forms.Form): FILE: accounts/migrations/0001_initial.py class Migration (line 9) | class Migration(migrations.Migration): FILE: accounts/migrations/0002_alter_bloguser_options_remove_bloguser_created_time_and_more.py class Migration (line 7) | class Migration(migrations.Migration): FILE: accounts/models.py class BlogUser (line 11) | class BlogUser(AbstractUser): method get_absolute_url (line 17) | def get_absolute_url(self): method __str__ (line 22) | def __str__(self): method get_full_url (line 25) | def get_full_url(self): class Meta (line 31) | class Meta: FILE: accounts/test_admin.py class BlogUserAdminTest (line 14) | class BlogUserAdminTest(BaseTestCase, AdminTestMixin): method setUp (line 17) | def setUp(self): method test_admin_list_display (line 22) | def test_admin_list_display(self): method test_admin_search (line 29) | def test_admin_search(self): method test_admin_filter_by_is_staff (line 37) | def test_admin_filter_by_is_staff(self): method test_admin_change_user (line 46) | def test_admin_change_user(self): method test_admin_requires_login (line 62) | def test_admin_requires_login(self): method test_admin_forbidden_for_normal_user (line 67) | def test_admin_forbidden_for_normal_user(self): method test_get_list_filter (line 72) | def test_get_list_filter(self): method test_get_readonly_fields_for_superuser (line 80) | def test_get_readonly_fields_for_superuser(self): method test_get_readonly_fields_for_staff (line 87) | def test_get_readonly_fields_for_staff(self): FILE: accounts/test_user_business_logic.py class UserRegistrationTest (line 12) | class UserRegistrationTest(TestCase): method test_user_can_be_created (line 15) | def test_user_can_be_created(self): method test_user_password_is_hashed (line 27) | def test_user_password_is_hashed(self): method test_user_can_check_password (line 41) | def test_user_can_check_password(self): method test_username_must_be_unique (line 55) | def test_username_must_be_unique(self): method test_email_is_stored_correctly (line 71) | def test_email_is_stored_correctly(self): method test_user_is_active_by_default (line 82) | def test_user_is_active_by_default(self): method test_user_is_not_staff_by_default (line 92) | def test_user_is_not_staff_by_default(self): method test_user_is_not_superuser_by_default (line 102) | def test_user_is_not_superuser_by_default(self): class UserAuthenticationTest (line 113) | class UserAuthenticationTest(TestCase): method setUp (line 116) | def setUp(self): method test_user_can_authenticate_with_correct_credentials (line 128) | def test_user_can_authenticate_with_correct_credentials(self): method test_user_cannot_authenticate_with_wrong_password (line 134) | def test_user_cannot_authenticate_with_wrong_password(self): method test_user_cannot_authenticate_with_wrong_username (line 139) | def test_user_cannot_authenticate_with_wrong_username(self): method test_inactive_user_cannot_authenticate (line 144) | def test_inactive_user_cannot_authenticate(self): method test_active_user_can_authenticate (line 156) | def test_active_user_can_authenticate(self): class UserPasswordManagementTest (line 165) | class UserPasswordManagementTest(TestCase): method setUp (line 168) | def setUp(self): method test_user_can_change_password (line 176) | def test_user_can_change_password(self): method test_password_change_requires_save (line 193) | def test_password_change_requires_save(self): method test_set_unusable_password (line 207) | def test_set_unusable_password(self): class UserPermissionTest (line 216) | class UserPermissionTest(TestCase): method setUp (line 219) | def setUp(self): method test_normal_user_has_no_special_privileges (line 240) | def test_normal_user_has_no_special_privileges(self): method test_staff_user_is_staff (line 245) | def test_staff_user_is_staff(self): method test_superuser_has_all_privileges (line 251) | def test_superuser_has_all_privileges(self): method test_create_superuser_method (line 257) | def test_create_superuser_method(self): method test_user_can_be_promoted_to_staff (line 268) | def test_user_can_be_promoted_to_staff(self): method test_user_can_be_promoted_to_superuser (line 285) | def test_user_can_be_promoted_to_superuser(self): class UserActivationTest (line 303) | class UserActivationTest(TestCase): method test_user_can_be_deactivated (line 306) | def test_user_can_be_deactivated(self): method test_user_can_be_reactivated (line 323) | def test_user_can_be_reactivated(self): class UserProfileTest (line 342) | class UserProfileTest(TestCase): method test_user_has_username (line 345) | def test_user_has_username(self): method test_user_has_email (line 355) | def test_user_has_email(self): method test_user_can_update_email (line 365) | def test_user_can_update_email(self): method test_user_string_representation (line 380) | def test_user_string_representation(self): class UserQueryTest (line 394) | class UserQueryTest(TestCase): method setUp (line 397) | def setUp(self): method test_query_user_by_username (line 409) | def test_query_user_by_username(self): method test_query_user_by_email (line 414) | def test_query_user_by_email(self): method test_query_active_users (line 419) | def test_query_active_users(self): method test_query_staff_users (line 431) | def test_query_staff_users(self): method test_query_superusers (line 443) | def test_query_superusers(self): class UserDeletionTest (line 457) | class UserDeletionTest(TestCase): method test_user_can_be_deleted (line 460) | def test_user_can_be_deleted(self): method test_delete_user_cascade_effects (line 477) | def test_delete_user_cascade_effects(self): FILE: accounts/tests.py class AccountTest (line 14) | class AccountTest(TestCase): method setUp (line 15) | def setUp(self): method test_validate_account (line 25) | def test_validate_account(self): method test_validate_register (line 58) | def test_validate_register(self): method test_verify_email_code (line 121) | def test_verify_email_code(self): method test_forget_password_email_code_success (line 133) | def test_forget_password_email_code_success(self): method test_forget_password_email_code_fail (line 142) | def test_forget_password_email_code_fail(self): method test_forget_password_email_success (line 155) | def test_forget_password_email_success(self): method test_forget_password_email_not_user (line 177) | def test_forget_password_email_not_user(self): method test_forget_password_email_code_error (line 192) | def test_forget_password_email_code_error(self): FILE: accounts/user_login_backend.py class EmailOrUsernameModelBackend (line 5) | class EmailOrUsernameModelBackend(ModelBackend): method authenticate (line 10) | def authenticate(self, request, username=None, password=None, **kwargs): method get_user (line 22) | def get_user(self, username): FILE: accounts/utils.py function send_verify_email (line 13) | def send_verify_email(to_mail: str, code: str, subject: str = _("Verify ... function verify (line 26) | def verify(email: str, code: str) -> typing.Optional[str]: function set_code (line 42) | def set_code(email: str, code: str): function get_code (line 47) | def get_code(email: str) -> typing.Optional[str]: FILE: accounts/views.py class RegisterView (line 30) | class RegisterView(SecureFormView): method form_valid (line 39) | def form_valid(self, form): class LogoutView (line 80) | class LogoutView(LogoutRedirectView): method get (line 88) | def get(self, request, *args, **kwargs): class LoginView (line 97) | class LoginView(LoginFormView): method get_context_data (line 111) | def get_context_data(self, **kwargs): method form_valid (line 119) | def form_valid(self, form): method get_success_url (line 152) | def get_success_url(self): function account_result (line 162) | def account_result(request): class ForgetPasswordView (line 195) | class ForgetPasswordView(SecureFormView): method form_valid (line 204) | def form_valid(self, form): class ForgetPasswordEmailCode (line 214) | class ForgetPasswordEmailCode(View): method post (line 216) | def post(self, request: HttpRequest): FILE: blog/admin.py class ArticleForm (line 12) | class ArticleForm(forms.ModelForm): class Meta (line 15) | class Meta: function makr_article_publish (line 20) | def makr_article_publish(modeladmin, request, queryset): function draft_article (line 24) | def draft_article(modeladmin, request, queryset): function close_article_commentstatus (line 28) | def close_article_commentstatus(modeladmin, request, queryset): function open_article_commentstatus (line 32) | def open_article_commentstatus(modeladmin, request, queryset): class ArticlelAdmin (line 42) | class ArticlelAdmin(admin.ModelAdmin): method link_to_category (line 69) | def link_to_category(self, obj): method get_form (line 76) | def get_form(self, request, obj=None, **kwargs): method save_model (line 82) | def save_model(self, request, obj, form, change): method get_view_on_site_url (line 85) | def get_view_on_site_url(self, obj=None): class TagAdmin (line 95) | class TagAdmin(admin.ModelAdmin): class CategoryAdmin (line 99) | class CategoryAdmin(admin.ModelAdmin): class LinksAdmin (line 104) | class LinksAdmin(admin.ModelAdmin): class SideBarAdmin (line 108) | class SideBarAdmin(admin.ModelAdmin): class BlogSettingsAdmin (line 113) | class BlogSettingsAdmin(admin.ModelAdmin): method has_add_permission (line 116) | def has_add_permission(self, request): method has_delete_permission (line 120) | def has_delete_permission(self, request, obj=None): method changelist_view (line 124) | def changelist_view(self, request, extra_context=None): method save_model (line 137) | def save_model(self, request, obj, form, change): FILE: blog/apps.py class BlogConfig (line 7) | class BlogConfig(AppConfig): method ready (line 10) | def ready(self): method check_search_index (line 15) | def check_search_index(self): FILE: blog/context_processors.py function seo_processor (line 11) | def seo_processor(requests): FILE: blog/documents.py class GeoIp (line 76) | class GeoIp(InnerDoc): class UserAgentBrowser (line 83) | class UserAgentBrowser(InnerDoc): class UserAgentOS (line 88) | class UserAgentOS(UserAgentBrowser): class UserAgentDevice (line 92) | class UserAgentDevice(InnerDoc): class UserAgent (line 98) | class UserAgent(InnerDoc): class ElapsedTimeDocument (line 106) | class ElapsedTimeDocument(Document): class Index (line 114) | class Index: class ElaspedTimeDocumentManager (line 122) | class ElaspedTimeDocumentManager: method build_index (line 124) | def build_index(): method delete_index (line 133) | def delete_index(): method create (line 142) | def create(url, time_taken, log_datetime, useragent, ip): class ArticleDocument (line 174) | class ArticleDocument(Document): class Index (line 197) | class Index: class ArticleDocumentManager (line 205) | class ArticleDocumentManager(): method __init__ (line 207) | def __init__(self): method create_index (line 210) | def create_index(self): method delete_index (line 213) | def delete_index(self): method convert_to_doc (line 221) | def convert_to_doc(self, articles): method rebuild (line 245) | def rebuild(self, articles=None): method update_docs (line 252) | def update_docs(self, docs): FILE: blog/forms.py class BlogSearchForm (line 9) | class BlogSearchForm(SearchForm): method search (line 12) | def search(self): FILE: blog/management/commands/build_index.py class Command (line 8) | class Command(BaseCommand): method handle (line 11) | def handle(self, *args, **options): FILE: blog/management/commands/build_search_words.py class Command (line 7) | class Command(BaseCommand): method handle (line 10) | def handle(self, *args, **options): FILE: blog/management/commands/clear_cache.py class Command (line 6) | class Command(BaseCommand): method handle (line 9) | def handle(self, *args, **options): FILE: blog/management/commands/create_testdata.py class Command (line 8) | class Command(BaseCommand): method handle (line 11) | def handle(self, *args, **options): FILE: blog/management/commands/ping_baidu.py class Command (line 10) | class Command(BaseCommand): method add_arguments (line 13) | def add_arguments(self, parser): method get_full_url (line 24) | def get_full_url(self, path): method handle (line 28) | def handle(self, *args, **options): FILE: blog/management/commands/sync_user_avatar.py class Command (line 10) | class Command(BaseCommand): method test_picture (line 13) | def test_picture(self, url): method handle (line 20) | def handle(self, *args, **options): FILE: blog/middleware.py class OnlineMiddleware (line 12) | class OnlineMiddleware(object): method __init__ (line 13) | def __init__(self, get_response=None): method __call__ (line 17) | def __call__(self, request): FILE: blog/migrations/0001_initial.py class Migration (line 10) | class Migration(migrations.Migration): FILE: blog/migrations/0002_blogsettings_global_footer_and_more.py class Migration (line 6) | class Migration(migrations.Migration): FILE: blog/migrations/0003_blogsettings_comment_need_review.py class Migration (line 6) | class Migration(migrations.Migration): FILE: blog/migrations/0004_rename_analyticscode_blogsettings_analytics_code_and_more.py class Migration (line 6) | class Migration(migrations.Migration): FILE: blog/migrations/0005_alter_article_options_alter_category_options_and_more.py class Migration (line 10) | class Migration(migrations.Migration): FILE: blog/migrations/0006_alter_blogsettings_options.py class Migration (line 6) | class Migration(migrations.Migration): FILE: blog/migrations/0007_article_idx_type_status_pub_article_idx_status_views_and_more.py class Migration (line 7) | class Migration(migrations.Migration): FILE: blog/migrations/0008_blogsettings_color_scheme.py class Migration (line 6) | class Migration(migrations.Migration): FILE: blog/models.py class LinkShowType (line 21) | class LinkShowType(models.TextChoices): class BaseModel (line 29) | class BaseModel(models.Model): method save (line 34) | def save(self, *args, **kwargs): method get_full_url (line 48) | def get_full_url(self): class Meta (line 54) | class Meta: method get_absolute_url (line 58) | def get_absolute_url(self): class Article (line 62) | class Article(BaseModel): method body_to_string (line 109) | def body_to_string(self): method __str__ (line 112) | def __str__(self): class Meta (line 115) | class Meta: method get_absolute_url (line 131) | def get_absolute_url(self): method get_category_tree (line 140) | def get_category_tree(self): method save (line 146) | def save(self, *args, **kwargs): method viewed (line 149) | def viewed(self): method comment_list (line 153) | def comment_list(self): method get_admin_url (line 165) | def get_admin_url(self): method next_article (line 170) | def next_article(self): method prev_article (line 176) | def prev_article(self): method get_first_image_url (line 180) | def get_first_image_url(self): class Category (line 191) | class Category(BaseModel): class Meta (line 203) | class Meta: method get_absolute_url (line 208) | def get_absolute_url(self): method __str__ (line 213) | def __str__(self): method get_category_tree (line 217) | def get_category_tree(self): method get_sub_categorys (line 233) | def get_sub_categorys(self): class Tag (line 254) | class Tag(BaseModel): method __str__ (line 259) | def __str__(self): method get_absolute_url (line 262) | def get_absolute_url(self): method get_article_count (line 266) | def get_article_count(self): class Meta (line 269) | class Meta: class Links (line 275) | class Links(models.Model): class Meta (line 291) | class Meta: method __str__ (line 296) | def __str__(self): class SideBar (line 300) | class SideBar(models.Model): class Meta (line 309) | class Meta: method __str__ (line 314) | def __str__(self): class BlogSettings (line 318) | class BlogSettings(models.Model): class Meta (line 391) | class Meta: method __str__ (line 395) | def __str__(self): method clean (line 398) | def clean(self): method save (line 402) | def save(self, *args, **kwargs): FILE: blog/search_indexes.py class ArticleIndex (line 6) | class ArticleIndex(indexes.SearchIndex, indexes.Indexable): method get_model (line 11) | def get_model(self): method index_queryset (line 14) | def index_queryset(self, using=None): FILE: blog/static/account/js/account.js function time (line 3) | function time(o) { FILE: blog/static/blog/js/mathjax-loader.js function hasMathFormulas (line 12) | function hasMathFormulas() { function configureMathJax (line 21) | function configureMathJax() { function loadMathJax (line 82) | function loadMathJax() { function init (line 114) | function init() { FILE: blog/templatetags/blog_tags.py function head_meta (line 30) | def head_meta(context): function timeformat (line 35) | def timeformat(data): function datetimeformat (line 44) | def datetimeformat(data): function custom_markdown (line 54) | def custom_markdown(content): function sidebar_markdown (line 71) | def sidebar_markdown(content): function render_article_content (line 77) | def render_article_content(context, article, is_summary=False): function get_markdown_toc (line 131) | def get_markdown_toc(content): function current_nav_item (line 138) | def current_nav_item(request): function comment_markdown (line 156) | def comment_markdown(content): function to_json (line 162) | def to_json(value): function get_reactions_for_user (line 174) | def get_reactions_for_user(comment, user): function truncatechars_content (line 190) | def truncatechars_content(content): function truncate (line 204) | def truncate(content): function load_breadcrumb (line 211) | def load_breadcrumb(article): function load_articletags (line 232) | def load_articletags(article): function load_sidebar (line 252) | def load_sidebar(user, linktype): function load_article_metas (line 327) | def load_article_metas(article, user): function load_pagination_info (line 340) | def load_pagination_info(page_obj, page_type, tag_name): function load_article_detail (line 410) | def load_article_detail(article, isindex, user, query=None): function load_article_detail_with_highlight (line 431) | def load_article_detail_with_highlight(article, highlighted, isindex, us... function highlight_search_term (line 453) | def highlight_search_term(text, query): function highlight_content (line 478) | def highlight_content(html_content, query): function gravatar_url (line 521) | def gravatar_url(email, size=40): function gravatar (line 556) | def gravatar(email, size=40): function query (line 565) | def query(qs, **kwargs): function addstr (line 576) | def addstr(arg1, arg2): function render_plugin_widgets (line 584) | def render_plugin_widgets(context, position, **kwargs): function plugin_critical_head_resources (line 621) | def plugin_critical_head_resources(context): function plugin_head_resources (line 645) | def plugin_head_resources(context): function plugin_body_resources (line 665) | def plugin_body_resources(context): function plugin_compressed_css (line 685) | def plugin_compressed_css(): function plugin_compressed_js (line 699) | def plugin_compressed_js(): function plugin_widget (line 715) | def plugin_widget(context, plugin_name, widget_type='default', **kwargs): FILE: blog/templatetags/vite_tags.py function load_manifest (line 26) | def load_manifest(): function vite_asset (line 63) | def vite_asset(entry_name): function vite_js (line 88) | def vite_js(entry_name='src/main.js'): function vite_css (line 138) | def vite_css(entry_name='src/styles/main.css'): function vite_preload (line 170) | def vite_preload(entry_name): function is_vite_dev_mode (line 203) | def is_vite_dev_mode(): function vite_dev_server_url (line 221) | def vite_dev_server_url(): FILE: blog/test_admin.py class ArticleAdminTest (line 14) | class ArticleAdminTest(BaseTestCase, AdminTestMixin): method setUp (line 17) | def setUp(self): method test_admin_list_display (line 22) | def test_admin_list_display(self): method test_admin_search_by_title (line 28) | def test_admin_search_by_title(self): method test_admin_filter_by_status (line 36) | def test_admin_filter_by_status(self): method test_admin_filter_by_category (line 43) | def test_admin_filter_by_category(self): method test_admin_change_article (line 50) | def test_admin_change_article(self): method test_save_model_sets_author (line 57) | def test_save_model_sets_author(self): method test_get_list_display (line 76) | def test_get_list_display(self): method test_formfield_for_foreignkey_author (line 85) | def test_formfield_for_foreignkey_author(self): class CategoryAdminTest (line 96) | class CategoryAdminTest(BaseTestCase, AdminTestMixin): method test_category_admin_list (line 99) | def test_category_admin_list(self): method test_category_admin_search (line 105) | def test_category_admin_search(self): method test_category_admin_change (line 113) | def test_category_admin_change(self): class TagAdminTest (line 121) | class TagAdminTest(BaseTestCase, AdminTestMixin): method test_tag_admin_list (line 124) | def test_tag_admin_list(self): method test_tag_admin_search (line 130) | def test_tag_admin_search(self): method test_tag_admin_change (line 138) | def test_tag_admin_change(self): FILE: blog/test_article_business_logic.py class ArticleLifecycleTest (line 13) | class ArticleLifecycleTest(TestCase): method setUp (line 16) | def setUp(self): method test_article_created_as_draft_by_default (line 47) | def test_article_created_as_draft_by_default(self): method test_article_draft_to_published_transition (line 59) | def test_article_draft_to_published_transition(self): method test_article_published_to_draft_transition (line 82) | def test_article_published_to_draft_transition(self): method test_published_article_is_publicly_accessible (line 104) | def test_published_article_is_publicly_accessible(self): method test_draft_article_not_in_public_list (line 120) | def test_draft_article_not_in_public_list(self): method test_article_views_counter_increases (line 149) | def test_article_views_counter_increases(self): method test_article_views_multiple_increments (line 171) | def test_article_views_multiple_increments(self): class ArticleCommentStatusTest (line 192) | class ArticleCommentStatusTest(TestCase): method setUp (line 195) | def setUp(self): method test_article_comment_open_by_default (line 208) | def test_article_comment_open_by_default(self): method test_article_comment_can_be_closed (line 222) | def test_article_comment_can_be_closed(self): method test_closed_comment_article_status (line 241) | def test_closed_comment_article_status(self): class ArticlePermissionTest (line 257) | class ArticlePermissionTest(TestCase): method setUp (line 260) | def setUp(self): method test_author_is_article_owner (line 294) | def test_author_is_article_owner(self): method test_other_user_is_not_article_owner (line 298) | def test_other_user_is_not_article_owner(self): method test_admin_has_superuser_privilege (line 302) | def test_admin_has_superuser_privilege(self): method test_normal_user_no_staff_privilege (line 307) | def test_normal_user_no_staff_privilege(self): method test_article_author_can_edit (line 312) | def test_article_author_can_edit(self): method test_other_user_cannot_edit (line 318) | def test_other_user_cannot_edit(self): method test_admin_can_edit_any_article (line 324) | def test_admin_can_edit_any_article(self): class ArticleTypeTest (line 332) | class ArticleTypeTest(TestCase): method setUp (line 335) | def setUp(self): method test_article_type_is_article (line 348) | def test_article_type_is_article(self): method test_article_type_is_page (line 361) | def test_article_type_is_page(self): method test_articles_and_pages_are_separate (line 374) | def test_articles_and_pages_are_separate(self): class ArticleCategoryTagTest (line 407) | class ArticleCategoryTagTest(TestCase): method setUp (line 410) | def setUp(self): method test_article_belongs_to_category (line 423) | def test_article_belongs_to_category(self): method test_category_has_articles (line 436) | def test_category_has_articles(self): method test_article_can_change_category (line 466) | def test_article_can_change_category(self): class ArticleTimestampTest (line 490) | class ArticleTimestampTest(TestCase): method setUp (line 493) | def setUp(self): method test_article_has_creation_time (line 506) | def test_article_has_creation_time(self): method test_article_has_last_mod_time (line 522) | def test_article_has_last_mod_time(self): method test_article_last_mod_time_updates (line 535) | def test_article_last_mod_time_updates(self): class ArticleSlugTest (line 561) | class ArticleSlugTest(TestCase): method setUp (line 564) | def setUp(self): method test_article_has_id (line 577) | def test_article_has_id(self): method test_article_absolute_url (line 593) | def test_article_absolute_url(self): FILE: blog/test_context_processors.py class SeoProcessorTest (line 15) | class SeoProcessorTest(TestCase): method setUp (line 18) | def setUp(self): method tearDown (line 48) | def tearDown(self): method test_processor_returns_required_variables (line 52) | def test_processor_returns_required_variables(self): method test_processor_caching (line 84) | def test_processor_caching(self): method test_processor_with_anonymous_user (line 103) | def test_processor_with_anonymous_user(self): method test_processor_with_https_request (line 112) | def test_processor_with_https_request(self): method test_processor_with_http_request (line 120) | def test_processor_with_http_request(self): method test_processor_current_year (line 128) | def test_processor_current_year(self): method test_processor_nav_category_list (line 137) | def test_processor_nav_category_list(self): method test_processor_nav_pages (line 150) | def test_processor_nav_pages(self): method test_processor_only_shows_published_pages (line 163) | def test_processor_only_shows_published_pages(self): method test_processor_cache_expiration (line 187) | def test_processor_cache_expiration(self): method test_processor_with_custom_blog_settings (line 205) | def test_processor_with_custom_blog_settings(self, mock_get_blog_setti... method test_processor_site_base_url_with_different_hosts (line 242) | def test_processor_site_base_url_with_different_hosts(self): method test_processor_dynamic_values_not_cached (line 253) | def test_processor_dynamic_values_not_cached(self): method test_processor_handles_empty_settings (line 270) | def test_processor_handles_empty_settings(self): method test_processor_logs_cache_miss (line 283) | def test_processor_logs_cache_miss(self, mock_logger): method test_processor_multiple_categories (line 297) | def test_processor_multiple_categories(self): method test_processor_multiple_pages (line 313) | def test_processor_multiple_pages(self): method test_processor_excludes_articles_from_nav_pages (line 343) | def test_processor_excludes_articles_from_nav_pages(self): method test_processor_color_scheme_setting (line 367) | def test_processor_color_scheme_setting(self): FILE: blog/test_middleware.py class OnlineMiddlewareTest (line 14) | class OnlineMiddlewareTest(TestCase): method setUp (line 17) | def setUp(self): method get_response (line 22) | def get_response(self, request): method test_middleware_initialization (line 27) | def test_middleware_initialization(self): method test_middleware_processes_request_normally (line 33) | def test_middleware_processes_request_normally(self): method test_middleware_calculates_page_render_time (line 45) | def test_middleware_calculates_page_render_time(self): method test_middleware_handles_streaming_response (line 65) | def test_middleware_handles_streaming_response(self): method test_middleware_handles_missing_user_agent (line 85) | def test_middleware_handles_missing_user_agent(self): method test_middleware_elasticsearch_integration_enabled (line 97) | def test_middleware_elasticsearch_integration_enabled(self, mock_create): method test_middleware_elasticsearch_integration_disabled (line 117) | def test_middleware_elasticsearch_integration_disabled(self, mock_crea... method test_middleware_ip_detection (line 130) | def test_middleware_ip_detection(self, mock_get_client_ip): method test_middleware_user_agent_parsing (line 143) | def test_middleware_user_agent_parsing(self): method test_middleware_handles_elasticsearch_exception (line 160) | def test_middleware_handles_elasticsearch_exception(self, mock_create): method test_middleware_handles_content_replace_exception (line 177) | def test_middleware_handles_content_replace_exception(self): method test_middleware_time_format (line 196) | def test_middleware_time_format(self): method test_middleware_logs_exceptions (line 214) | def test_middleware_logs_exceptions(self, mock_create, mock_logger): method test_middleware_with_multiple_requests (line 231) | def test_middleware_with_multiple_requests(self): method test_middleware_preserves_response_headers (line 245) | def test_middleware_preserves_response_headers(self): method test_middleware_uses_correct_timezone (line 266) | def test_middleware_uses_correct_timezone(self, mock_now, mock_create): FILE: blog/test_templatetags.py class BlogTagsTest (line 14) | class BlogTagsTest(BaseTestCase): method setUp (line 17) | def setUp(self): method test_load_articletags (line 21) | def test_load_articletags(self): method test_load_pagination_info (line 31) | def test_load_pagination_info(self): method test_load_pagination_info_last_page (line 46) | def test_load_pagination_info_last_page(self): method test_highlight_search_term (line 58) | def test_highlight_search_term(self): method test_highlight_search_term_no_match (line 65) | def test_highlight_search_term_no_match(self): method test_highlight_search_term_empty_query (line 71) | def test_highlight_search_term_empty_query(self): method test_highlight_content (line 77) | def test_highlight_content(self): method test_custom_markdown (line 83) | def test_custom_markdown(self): method test_article_body_rendering (line 90) | def test_article_body_rendering(self): class ViteTagsTest (line 99) | class ViteTagsTest(BaseTestCase): method test_vite_module_exists (line 102) | def test_vite_module_exists(self): class CustomFiltersTest (line 109) | class CustomFiltersTest(BaseTestCase): method test_date_format_filter (line 112) | def test_date_format_filter(self): method test_url_encode_filter (line 122) | def test_url_encode_filter(self): method test_strip_tags_filter (line 129) | def test_strip_tags_filter(self): class SidebarTagsTest (line 140) | class SidebarTagsTest(BaseTestCase): method test_sidebar_data_exists (line 143) | def test_sidebar_data_exists(self): class CacheTagsTest (line 151) | class CacheTagsTest(BaseTestCase): method test_cache_operations (line 154) | def test_cache_operations(self): class MarkdownExtensionsTest (line 167) | class MarkdownExtensionsTest(BaseTestCase): method test_code_highlight (line 170) | def test_code_highlight(self): method test_table_support (line 179) | def test_table_support(self): method test_auto_link (line 189) | def test_auto_link(self): method test_strikethrough (line 196) | def test_strikethrough(self): FILE: blog/test_views.py class ArticleViewTest (line 11) | class ArticleViewTest(BaseTestCase, ViewTestMixin): method test_article_detail_view (line 14) | def test_article_detail_view(self): method test_article_detail_view_draft (line 21) | def test_article_detail_view_draft(self): method test_article_detail_increases_views (line 29) | def test_article_detail_increases_views(self): method test_article_archive_view (line 36) | def test_article_archive_view(self): method test_article_archive_by_year (line 41) | def test_article_archive_by_year(self): method test_article_archive_by_year_month (line 53) | def test_article_archive_by_year_month(self): method test_index_view (line 64) | def test_index_view(self): method test_index_view_pagination (line 70) | def test_index_view_pagination(self): method test_category_view (line 80) | def test_category_view(self): method test_category_view_invalid_slug (line 86) | def test_category_view_invalid_slug(self): method test_tag_view (line 92) | def test_tag_view(self): method test_tag_view_invalid_slug (line 99) | def test_tag_view_invalid_slug(self): method test_author_view (line 105) | def test_author_view(self): class SearchViewTest (line 112) | class SearchViewTest(BaseTestCase, ViewTestMixin): method test_search_view_accessible (line 115) | def test_search_view_accessible(self): class ArticlePermissionTest (line 127) | class ArticlePermissionTest(BaseTestCase, ViewTestMixin): method test_only_author_can_edit (line 130) | def test_only_author_can_edit(self): method test_article_status_visibility (line 141) | def test_article_status_visibility(self): class ErrorHandlingTest (line 154) | class ErrorHandlingTest(BaseTestCase, ViewTestMixin): method test_404_page (line 157) | def test_404_page(self): method test_article_404 (line 162) | def test_article_404(self): method test_invalid_page_number (line 172) | def test_invalid_page_number(self): method test_page_out_of_range (line 179) | def test_page_out_of_range(self): FILE: blog/tests.py class ArticleTest (line 22) | class ArticleTest(TestCase): method setUp (line 23) | def setUp(self): method test_validate_article (line 27) | def test_validate_article(self): method check_pagination (line 151) | def check_pagination(self, p, type, value): method test_image (line 162) | def test_image(self): method test_errorpage (line 185) | def test_errorpage(self): method test_commands (line 189) | def test_commands(self): class SearchHighlightTest (line 235) | class SearchHighlightTest(TestCase): method test_highlight_search_term_filter (line 238) | def test_highlight_search_term_filter(self): method test_highlight_content_filter (line 266) | def test_highlight_content_filter(self): method test_search_page_access (line 286) | def test_search_page_access(self): method test_chinese_keyword_highlight (line 296) | def test_chinese_keyword_highlight(self): FILE: blog/views.py class ArticleListView (line 34) | class ArticleListView(CachedListViewMixin, PageNumberMixin, ListView): method get_view_cache_key (line 53) | def get_view_cache_key(self): method get_context_data (line 56) | def get_context_data(self, **kwargs): class IndexView (line 61) | class IndexView(OptimizedArticleQueryMixin, ArticleListView): method get_queryset_data (line 70) | def get_queryset_data(self): method get_queryset_cache_key (line 76) | def get_queryset_cache_key(self): method get_context_data (line 79) | def get_context_data(self, **kwargs): class ArticleDetailView (line 89) | class ArticleDetailView(DetailView): method get_context_data (line 98) | def get_context_data(self, **kwargs): class CategoryDetailView (line 177) | class CategoryDetailView(SlugCachedMixin, OptimizedArticleQueryMixin, Ar... method get_queryset_data (line 188) | def get_queryset_data(self): method get_queryset_cache_key (line 197) | def get_queryset_cache_key(self): method get_context_data (line 202) | def get_context_data(self, **kwargs): class AuthorDetailView (line 224) | class AuthorDetailView(OptimizedArticleQueryMixin, ArticleListView): method get_queryset_cache_key (line 232) | def get_queryset_cache_key(self): method get_queryset_data (line 237) | def get_queryset_data(self): method get_context_data (line 243) | def get_context_data(self, **kwargs): class TagDetailView (line 258) | class TagDetailView(SlugCachedMixin, OptimizedArticleQueryMixin, Article... method get_queryset_data (line 269) | def get_queryset_data(self): method get_queryset_cache_key (line 276) | def get_queryset_cache_key(self): method get_context_data (line 281) | def get_context_data(self, **kwargs): class ArchivesView (line 296) | class ArchivesView(OptimizedArticleQueryMixin, ArticleListView): method get_queryset_data (line 307) | def get_queryset_data(self): method get_queryset_cache_key (line 310) | def get_queryset_cache_key(self): class LinkListView (line 314) | class LinkListView(ListView): method get_queryset (line 318) | def get_queryset(self): class EsSearchView (line 322) | class EsSearchView(SearchView): method build_form (line 323) | def build_form(self, form_kwargs=None): method get_context (line 338) | def get_context(self): function fileupload (line 355) | def fileupload(request): function clean_cache_view (line 406) | def clean_cache_view(request): FILE: comments/admin.py function disable_commentstatus (line 9) | def disable_commentstatus(modeladmin, request, queryset): function enable_commentstatus (line 13) | def enable_commentstatus(modeladmin, request, queryset): class CommentAdmin (line 21) | class CommentAdmin(admin.ModelAdmin): method link_to_userinfo (line 37) | def link_to_userinfo(self, obj): method link_to_article (line 44) | def link_to_article(self, obj): class CommentReactionAdmin (line 54) | class CommentReactionAdmin(admin.ModelAdmin): method link_to_comment (line 62) | def link_to_comment(self, obj): method link_to_user (line 68) | def link_to_user(self, obj): FILE: comments/apps.py class CommentsConfig (line 4) | class CommentsConfig(AppConfig): FILE: comments/forms.py class CommentForm (line 7) | class CommentForm(ModelForm): class Meta (line 11) | class Meta: FILE: comments/migrations/0001_initial.py class Migration (line 9) | class Migration(migrations.Migration): FILE: comments/migrations/0002_alter_comment_is_enable.py class Migration (line 6) | class Migration(migrations.Migration): FILE: comments/migrations/0003_alter_comment_options_remove_comment_created_time_and_more.py class Migration (line 9) | class Migration(migrations.Migration): FILE: comments/migrations/0004_comment_idx_art_parent_enable_comment_idx_enable_id.py class Migration (line 7) | class Migration(migrations.Migration): FILE: comments/migrations/0005_commentreaction.py class Migration (line 8) | class Migration(migrations.Migration): FILE: comments/models.py class Comment (line 11) | class Comment(models.Model): class Meta (line 32) | class Meta: method __str__ (line 44) | def __str__(self): method get_reactions_summary (line 47) | def get_reactions_summary(self, user=None): class CommentReaction (line 94) | class CommentReaction(models.Model): class Meta (line 127) | class Meta: method __str__ (line 136) | def __str__(self): FILE: comments/templatetags/comments_tags.py function parse_commenttree (line 7) | def parse_commenttree(commentlist, comment): function show_comment_item (line 24) | def show_comment_item(comment, ischild): FILE: comments/test_comment_business_logic.py class CommentCreationTest (line 13) | class CommentCreationTest(TestCase): method setUp (line 16) | def setUp(self): method test_comment_created_with_required_fields (line 45) | def test_comment_created_with_required_fields(self): method test_comment_has_creation_time (line 58) | def test_comment_has_creation_time(self): method test_comment_author_is_correct (line 71) | def test_comment_author_is_correct(self): method test_comment_article_relationship (line 81) | def test_comment_article_relationship(self): class CommentModerationTest (line 95) | class CommentModerationTest(TestCase): method setUp (line 98) | def setUp(self): method test_comment_pending_by_default_when_review_required (line 133) | def test_comment_pending_by_default_when_review_required(self): method test_comment_approved_directly_when_no_review_required (line 148) | def test_comment_approved_directly_when_no_review_required(self): method test_comment_can_be_approved (line 163) | def test_comment_can_be_approved(self): method test_comment_can_be_rejected (line 179) | def test_comment_can_be_rejected(self): method test_only_approved_comments_in_public_list (line 195) | def test_only_approved_comments_in_public_list(self): class CommentReplyTest (line 223) | class CommentReplyTest(TestCase): method setUp (line 226) | def setUp(self): method test_comment_can_have_no_parent (line 261) | def test_comment_can_have_no_parent(self): method test_comment_can_have_parent (line 272) | def test_comment_can_have_parent(self): method test_parent_comment_has_replies (line 291) | def test_parent_comment_has_replies(self): method test_nested_comment_structure (line 323) | def test_nested_comment_structure(self): method test_multiple_replies_to_same_comment (line 356) | def test_multiple_replies_to_same_comment(self): class CommentArticleStatusTest (line 385) | class CommentArticleStatusTest(TestCase): method setUp (line 388) | def setUp(self): method test_can_comment_on_open_comment_article (line 407) | def test_can_comment_on_open_comment_article(self): method test_comment_status_closed_validation (line 432) | def test_comment_status_closed_validation(self): method test_comments_belong_to_correct_article (line 450) | def test_comments_belong_to_correct_article(self): class CommentQueryTest (line 495) | class CommentQueryTest(TestCase): method setUp (line 498) | def setUp(self): method test_query_comments_by_article (line 526) | def test_query_comments_by_article(self): method test_query_comments_by_author (line 540) | def test_query_comments_by_author(self): method test_query_root_comments_only (line 554) | def test_query_root_comments_only(self): method test_comment_ordering (line 590) | def test_comment_ordering(self): class CommentDeletionTest (line 610) | class CommentDeletionTest(TestCase): method setUp (line 613) | def setUp(self): method test_comment_can_be_deleted (line 641) | def test_comment_can_be_deleted(self): method test_deleting_parent_comment_with_replies (line 659) | def test_deleting_parent_comment_with_replies(self): FILE: comments/test_views.py class CommentViewTest (line 12) | class CommentViewTest(TransactionTestCase, ViewTestMixin): method setUp (line 15) | def setUp(self): method login_user (line 49) | def login_user(self): method test_post_comment_authenticated (line 53) | def test_post_comment_authenticated(self): method test_post_comment_unauthenticated (line 64) | def test_post_comment_unauthenticated(self): method test_post_comment_empty_body (line 73) | def test_post_comment_empty_body(self): method test_post_comment_invalid_article (line 81) | def test_post_comment_invalid_article(self): method test_post_reply_comment (line 88) | def test_post_reply_comment(self): method test_comment_moderation (line 108) | def test_comment_moderation(self): method test_comment_display_on_article (line 123) | def test_comment_display_on_article(self): method test_disabled_comment_not_display (line 135) | def test_disabled_comment_not_display(self): class CommentSpamTest (line 148) | class CommentSpamTest(TransactionTestCase, ViewTestMixin): method setUp (line 151) | def setUp(self): method login_user (line 181) | def login_user(self): method test_duplicate_comment (line 184) | def test_duplicate_comment(self): method test_comment_rate_limit (line 199) | def test_comment_rate_limit(self): class CommentSecurityTest (line 211) | class CommentSecurityTest(TransactionTestCase, ViewTestMixin): method setUp (line 214) | def setUp(self): method login_user (line 244) | def login_user(self): method test_xss_protection (line 247) | def test_xss_protection(self): method test_sql_injection_protection (line 261) | def test_sql_injection_protection(self): FILE: comments/tests.py class CommentsTest (line 13) | class CommentsTest(TransactionTestCase): method setUp (line 14) | def setUp(self): method update_article_comment_status (line 27) | def update_article_comment_status(self, article): method test_validate_comment (line 33) | def test_validate_comment(self): FILE: comments/utils.py function send_comment_email (line 11) | def send_comment_email(comment): FILE: comments/views.py class CommentPostView (line 14) | class CommentPostView(AuthenticatedFormView): method get (line 25) | def get(self, request, *args, **kwargs): method form_invalid (line 31) | def form_invalid(self, form): method form_valid (line 40) | def form_valid(self, form): class CommentReactionView (line 68) | class CommentReactionView(View): method get (line 75) | def get(self, request, comment_id): method post (line 88) | def post(self, request, comment_id): FILE: djangoblog/admin_site.py class DjangoBlogAdminSite (line 20) | class DjangoBlogAdminSite(AdminSite): method __init__ (line 24) | def __init__(self, name='admin'): method has_permission (line 27) | def has_permission(self, request): FILE: djangoblog/apps.py class DjangoblogAppConfig (line 3) | class DjangoblogAppConfig(AppConfig): method ready (line 7) | def ready(self): FILE: djangoblog/base_views.py class SecureFormView (line 17) | class SecureFormView(FormView): method dispatch (line 34) | def dispatch(self, *args, **kwargs): class AuthenticatedFormView (line 39) | class AuthenticatedFormView(FormView): method dispatch (line 54) | def dispatch(self, *args, **kwargs): class LoginFormView (line 59) | class LoginFormView(FormView): method dispatch (line 81) | def dispatch(self, request, *args, **kwargs): class LogoutRedirectView (line 86) | class LogoutRedirectView(RedirectView): method dispatch (line 102) | def dispatch(self, request, *args, **kwargs): class NoCacheFormView (line 107) | class NoCacheFormView(FormView): method dispatch (line 121) | def dispatch(self, request, *args, **kwargs): FILE: djangoblog/blog_signals.py function send_email_signal_handler (line 27) | def send_email_signal_handler(sender, **kwargs): function oauth_user_login_signal_handler (line 55) | def oauth_user_login_signal_handler(sender, **kwargs): function model_post_save_callback (line 68) | def model_post_save_callback( function user_auth_callback (line 174) | def user_auth_callback(sender, request, user, **kwargs): FILE: djangoblog/constants.py class CacheTimeout (line 11) | class CacheTimeout: class CacheKey (line 37) | class CacheKey: class HttpStatus (line 72) | class HttpStatus: class Pagination (line 89) | class Pagination: FILE: djangoblog/elasticsearch_backend.py class ElasticSearchBackend (line 14) | class ElasticSearchBackend(BaseSearchBackend): method __init__ (line 15) | def __init__(self, connection_alias, **connection_options): method _get_models (line 24) | def _get_models(self, iterable): method _create (line 29) | def _create(self, models): method _delete (line 34) | def _delete(self, models): method _rebuild (line 39) | def _rebuild(self, models): method update (line 44) | def update(self, index, iterable, commit=True): method remove (line 49) | def remove(self, obj_or_string): method clear (line 53) | def clear(self, models=None, commit=True): method get_suggestion (line 57) | def get_suggestion(query: str) -> str: method search (line 75) | def search(self, query_string, **kwargs): class ElasticSearchQuery (line 148) | class ElasticSearchQuery(BaseSearchQuery): method _convert_datetime (line 149) | def _convert_datetime(self, date): method clean (line 155) | def clean(self, query_fragment): method build_query_fragment (line 180) | def build_query_fragment(self, field, filter_type, value): method get_count (line 183) | def get_count(self): method get_spelling_suggestion (line 187) | def get_spelling_suggestion(self, preferred_query=None): method build_params (line 190) | def build_params(self, spelling_query=None): class ElasticSearchModelSearchForm (line 195) | class ElasticSearchModelSearchForm(ModelSearchForm): method search (line 197) | def search(self): class ElasticSearchEngine (line 204) | class ElasticSearchEngine(BaseEngine): FILE: djangoblog/error_views.py function render_error_page (line 16) | def render_error_page(request, status_code, message, exception=None): function page_not_found_view (line 56) | def page_not_found_view(request, exception, template_name='blog/error_pa... function server_error_view (line 78) | def server_error_view(request, template_name='blog/error_page.html'): function permission_denied_view (line 98) | def permission_denied_view(request, exception, template_name='blog/error... function bad_request_view (line 120) | def bad_request_view(request, exception, template_name='blog/error_page.... FILE: djangoblog/feeds.py class DjangoBlogFeed (line 10) | class DjangoBlogFeed(Feed): method author_name (line 17) | def author_name(self): method author_link (line 20) | def author_link(self): method items (line 23) | def items(self): method item_title (line 26) | def item_title(self, item): method item_description (line 29) | def item_description(self, item): method feed_copyright (line 32) | def feed_copyright(self): method item_link (line 36) | def item_link(self, item): method item_guid (line 39) | def item_guid(self, item): FILE: djangoblog/logentryadmin.py class LogEntryAdmin (line 11) | class LogEntryAdmin(admin.ModelAdmin): method has_add_permission (line 33) | def has_add_permission(self, request): method has_change_permission (line 36) | def has_change_permission(self, request, obj=None): method has_delete_permission (line 42) | def has_delete_permission(self, request, obj=None): method object_link (line 45) | def object_link(self, obj): method user_link (line 65) | def user_link(self, obj): method get_queryset (line 83) | def get_queryset(self, request): method get_actions (line 87) | def get_actions(self, request): FILE: djangoblog/mixins.py class TimeStampedModel (line 20) | class TimeStampedModel(models.Model): class Meta (line 43) | class Meta: method save (line 48) | def save(self, *args, **kwargs): class SlugCachedMixin (line 70) | class SlugCachedMixin: method get_slug_object (line 93) | def get_slug_object(self): class OptimizedArticleQueryMixin (line 118) | class OptimizedArticleQueryMixin: method get_optimized_article_queryset (line 131) | def get_optimized_article_queryset(self): class CachedListViewMixin (line 155) | class CachedListViewMixin: method get_queryset_cache_key (line 171) | def get_queryset_cache_key(self): method get_queryset_data (line 185) | def get_queryset_data(self): method get_queryset_from_cache (line 199) | def get_queryset_from_cache(self, cache_key): method get_queryset (line 221) | def get_queryset(self): class PageNumberMixin (line 232) | class PageNumberMixin: method page_number (line 246) | def page_number(self): class ArticleListMixin (line 264) | class ArticleListMixin( FILE: djangoblog/plugin_manage/base_plugin.py class BasePlugin (line 10) | class BasePlugin: method __init__ (line 22) | def __init__(self): method _get_plugin_directory (line 33) | def _get_plugin_directory(self): method _get_plugin_slug (line 39) | def _get_plugin_slug(self): method init_plugin (line 43) | def init_plugin(self): method register_hooks (line 50) | def register_hooks(self): method render_position_widget (line 58) | def render_position_widget(self, position, context, **kwargs): method should_display (line 91) | def should_display(self, position, context, **kwargs): method render_sidebar_widget (line 107) | def render_sidebar_widget(self, context, **kwargs): method render_article_bottom_widget (line 111) | def render_article_bottom_widget(self, context, **kwargs): method render_article_top_widget (line 115) | def render_article_top_widget(self, context, **kwargs): method render_header_widget (line 119) | def render_header_widget(self, context, **kwargs): method render_footer_widget (line 123) | def render_footer_widget(self, context, **kwargs): method render_comment_before_widget (line 127) | def render_comment_before_widget(self, context, **kwargs): method render_comment_after_widget (line 131) | def render_comment_after_widget(self, context, **kwargs): method render_template (line 136) | def render_template(self, template_name, context=None): method get_static_url (line 159) | def get_static_url(self, static_file): method get_css_files (line 164) | def get_css_files(self): method get_js_files (line 168) | def get_js_files(self): method get_critical_head_html (line 172) | def get_critical_head_html(self, context=None): method get_head_html (line 184) | def get_head_html(self, context=None): method get_body_html (line 188) | def get_body_html(self, context=None): method get_plugin_info (line 192) | def get_plugin_info(self): FILE: djangoblog/plugin_manage/hooks.py function register (line 8) | def register(hook_name: str, callback: callable): function run_action (line 18) | def run_action(hook_name: str, *args, **kwargs): function apply_filters (line 32) | def apply_filters(hook_name: str, value, *args, **kwargs): FILE: djangoblog/plugin_manage/loader.py function load_plugins (line 10) | def load_plugins(): function get_loaded_plugins (line 42) | def get_loaded_plugins(): function get_plugin_by_name (line 46) | def get_plugin_by_name(plugin_name): function get_plugin_by_slug (line 53) | def get_plugin_by_slug(plugin_slug): function get_plugins_info (line 60) | def get_plugins_info(): function get_plugins_by_position (line 64) | def get_plugins_by_position(position): FILE: djangoblog/settings.py function env_to_bool (line 19) | def env_to_bool(env, default): FILE: djangoblog/sitemap.py class StaticViewSitemap (line 7) | class StaticViewSitemap(Sitemap): method items (line 11) | def items(self): method location (line 14) | def location(self, item): class ArticleSiteMap (line 18) | class ArticleSiteMap(Sitemap): method items (line 22) | def items(self): method lastmod (line 25) | def lastmod(self, obj): class CategorySiteMap (line 29) | class CategorySiteMap(Sitemap): method items (line 33) | def items(self): method lastmod (line 36) | def lastmod(self, obj): class TagSiteMap (line 40) | class TagSiteMap(Sitemap): method items (line 44) | def items(self): method lastmod (line 47) | def lastmod(self, obj): class UserSiteMap (line 51) | class UserSiteMap(Sitemap): method items (line 55) | def items(self): method lastmod (line 58) | def lastmod(self, obj): FILE: djangoblog/spider_notify.py class SpiderNotify (line 9) | class SpiderNotify(): method baidu_notify (line 11) | def baidu_notify(urls): method notify (line 20) | def notify(url): FILE: djangoblog/test_base.py class BaseTestCase (line 14) | class BaseTestCase(TestCase): method setUp (line 20) | def setUp(self): method create_user (line 30) | def create_user(self, username='testuser', email='test@test.com', pass... method create_admin_user (line 39) | def create_admin_user(self, username='admin', email='admin@admin.com',... method create_staff_user (line 48) | def create_staff_user(self, username='staff', email='staff@test.com', ... method create_category (line 58) | def create_category(self, name='测试分类'): method create_tag (line 67) | def create_tag(self, name='测试标签'): method create_article (line 72) | def create_article(self, title='测试文章', body='测试内容', author=None, method create_comment (line 90) | def create_comment(self, article=None, author=None, body='测试评论', paren... method create_blog_settings (line 105) | def create_blog_settings(self): method login_user (line 117) | def login_user(self, user=None, password='testpass123'): method login_admin (line 123) | def login_admin(self): method assert_redirect_to_login (line 127) | def assert_redirect_to_login(self, response): method assert_permission_denied (line 132) | def assert_permission_denied(self, response): class ViewTestMixin (line 137) | class ViewTestMixin: method assert_view_success (line 143) | def assert_view_success(self, url, status_code=200): method assert_view_redirect (line 149) | def assert_view_redirect(self, url, redirect_url=None): method assert_view_forbidden (line 157) | def assert_view_forbidden(self, url): method assert_post_success (line 163) | def assert_post_success(self, url, data, status_code=200): method assert_ajax_success (line 169) | def assert_ajax_success(self, url, data=None): class AdminTestMixin (line 180) | class AdminTestMixin: method get_admin_url (line 186) | def get_admin_url(self, model, action='changelist'): method get_admin_change_url (line 193) | def get_admin_change_url(self, obj): method assert_admin_accessible (line 200) | def assert_admin_accessible(self, model): method assert_admin_forbidden_for_user (line 207) | def assert_admin_forbidden_for_user(self, model): class PluginTestMixin (line 215) | class PluginTestMixin: method create_plugin_context (line 221) | def create_plugin_context(self, **kwargs): method assert_plugin_hook_registered (line 234) | def assert_plugin_hook_registered(self, plugin, hook_name): method mock_plugin_config (line 240) | def mock_plugin_config(self, plugin_name, **config): class MockExternalService (line 247) | class MockExternalService: method mock_http_response (line 254) | def mock_http_response(status_code=200, content='', json_data=None): method mock_elasticsearch_response (line 265) | def mock_elasticsearch_response(hits=None): method mock_cache_get (line 275) | def mock_cache_get(return_value=None): method mock_cache_set (line 281) | def mock_cache_set(): FILE: djangoblog/test_email_integration.py class UserRegistrationEmailTest (line 21) | class UserRegistrationEmailTest(TestCase): method setUp (line 24) | def setUp(self): method test_user_registration_sends_verification_email (line 36) | def test_user_registration_sends_verification_email(self): method test_registration_email_contains_verification_link (line 68) | def test_registration_email_contains_verification_link(self): method test_multiple_registrations_send_separate_emails (line 95) | def test_multiple_registrations_send_separate_emails(self): class PasswordResetEmailTest (line 127) | class PasswordResetEmailTest(TestCase): method setUp (line 130) | def setUp(self): method test_forgot_password_sends_reset_email (line 148) | def test_forgot_password_sends_reset_email(self): method test_reset_email_contains_verification_code (line 185) | def test_reset_email_contains_verification_code(self): method test_reset_email_not_sent_for_nonexistent_email (line 205) | def test_reset_email_not_sent_for_nonexistent_email(self): class CommentNotificationEmailTest (line 230) | class CommentNotificationEmailTest(TestCase): method setUp (line 233) | def setUp(self): method test_comment_sends_notification_to_author (line 278) | def test_comment_sends_notification_to_author(self): method test_reply_comment_sends_notification_to_parent_author (line 312) | def test_reply_comment_sends_notification_to_parent_author(self): method test_comment_with_review_required_does_not_send_immediate_notification (line 363) | def test_comment_with_review_required_does_not_send_immediate_notifica... class EmailIntegrationWorkflowTest (line 405) | class EmailIntegrationWorkflowTest(TestCase): method setUp (line 408) | def setUp(self): method test_complete_user_journey_with_emails (line 422) | def test_complete_user_journey_with_emails(self): method test_email_sending_does_not_block_operations (line 491) | def test_email_sending_does_not_block_operations(self): class EmailContentValidationTest (line 524) | class EmailContentValidationTest(TestCase): method setUp (line 527) | def setUp(self): method test_email_has_proper_from_address (line 537) | def test_email_has_proper_from_address(self): method test_email_has_subject (line 564) | def test_email_has_subject(self): method test_email_has_body (line 585) | def test_email_has_body(self): method test_email_recipient_is_correct (line 606) | def test_email_recipient_is_correct(self): FILE: djangoblog/test_email_integration_complete.py class CompleteUserRegistrationFlowTest (line 21) | class CompleteUserRegistrationFlowTest(TestCase): method setUp (line 24) | def setUp(self): method test_complete_registration_verification_flow (line 34) | def test_complete_registration_verification_flow(self): method test_registration_with_duplicate_email_fails (line 119) | def test_registration_with_duplicate_email_fails(self): class CompletePasswordResetFlowTest (line 160) | class CompletePasswordResetFlowTest(TestCase): method setUp (line 163) | def setUp(self): method test_complete_password_reset_flow (line 180) | def test_complete_password_reset_flow(self): method test_password_reset_with_invalid_code_fails (line 243) | def test_password_reset_with_invalid_code_fails(self): class CompleteCommentNotificationFlowTest (line 279) | class CompleteCommentNotificationFlowTest(TestCase): method setUp (line 282) | def setUp(self): method test_complete_comment_notification_flow (line 325) | def test_complete_comment_notification_flow(self): method test_comment_notification_respects_review_setting (line 430) | def test_comment_notification_respects_review_setting(self): class CompleteUserJourneyIntegrationTest (line 487) | class CompleteUserJourneyIntegrationTest(TestCase): method setUp (line 490) | def setUp(self): method test_complete_user_lifecycle (line 503) | def test_complete_user_lifecycle(self): FILE: djangoblog/test_plugins.py class PluginHooksTest (line 20) | class PluginHooksTest(TestCase, PluginTestMixin): method setUp (line 23) | def setUp(self): method test_register_hook (line 27) | def test_register_hook(self): method test_apply_filters (line 36) | def test_apply_filters(self): method test_run_action (line 45) | def test_run_action(self): method test_multiple_hooks (line 56) | def test_multiple_hooks(self): method test_hook_error_handling (line 75) | def test_hook_error_handling(self): class BasePluginTest (line 92) | class BasePluginTest(BaseTestCase): method _create_test_plugin (line 95) | def _create_test_plugin(self): method test_plugin_initialization (line 105) | def test_plugin_initialization(self): method test_plugin_config (line 111) | def test_plugin_config(self): method test_plugin_register_hooks (line 117) | def test_plugin_register_hooks(self): method test_plugin_get_context (line 123) | def test_plugin_get_context(self): class PluginLoaderTest (line 131) | class PluginLoaderTest(TestCase): method test_load_plugins (line 135) | def test_load_plugins(self, mock_logger): method test_load_plugins_handles_errors (line 140) | def test_load_plugins_handles_errors(self): class ReadingTimePluginTest (line 149) | class ReadingTimePluginTest(BaseTestCase, PluginTestMixin): method test_reading_time_plugin_loaded (line 152) | def test_reading_time_plugin_loaded(self): method test_calculate_reading_time (line 158) | def test_calculate_reading_time(self): class ViewCountPluginTest (line 177) | class ViewCountPluginTest(BaseTestCase, PluginTestMixin): method test_view_count_plugin_loaded (line 180) | def test_view_count_plugin_loaded(self): method test_view_count_increment (line 186) | def test_view_count_increment(self): class SEOOptimizerPluginTest (line 196) | class SEOOptimizerPluginTest(BaseTestCase, PluginTestMixin): method test_seo_optimizer_plugin_loaded (line 199) | def test_seo_optimizer_plugin_loaded(self): method test_seo_meta_tags (line 205) | def test_seo_meta_tags(self): class ArticleCopyrightPluginTest (line 216) | class ArticleCopyrightPluginTest(BaseTestCase, PluginTestMixin): method test_copyright_plugin_loaded (line 219) | def test_copyright_plugin_loaded(self): method test_copyright_notice_added (line 225) | def test_copyright_notice_added(self): class ExternalLinksPluginTest (line 233) | class ExternalLinksPluginTest(BaseTestCase, PluginTestMixin): method test_external_links_plugin_loaded (line 236) | def test_external_links_plugin_loaded(self): method test_external_links_processing (line 242) | def test_external_links_processing(self): FILE: djangoblog/tests.py class DjangoBlogTest (line 6) | class DjangoBlogTest(TestCase): method setUp (line 7) | def setUp(self): method test_utils (line 10) | def test_utils(self): FILE: djangoblog/urls.py function health_check (line 46) | def health_check(request): FILE: djangoblog/utils.py function get_max_articleid_commentid (line 24) | def get_max_articleid_commentid(): function get_sha256 (line 30) | def get_sha256(value): function cache_decorator (line 36) | def cache_decorator(expiration=3 * 60): function expire_view_cache (line 72) | def expire_view_cache(path, servername, serverport, key_prefix=None): function get_current_site (line 98) | def get_current_site(): class CommonMarkdown (line 103) | class CommonMarkdown: method _convert_markdown (line 105) | def _convert_markdown(value): method get_markdown_with_toc (line 119) | def get_markdown_with_toc(value): method get_markdown (line 124) | def get_markdown(value): function send_email (line 129) | def send_email(emailto, title, content): function generate_code (line 138) | def generate_code() -> str: function parse_dict_to_url (line 143) | def parse_dict_to_url(dict): function get_blog_setting (line 150) | def get_blog_setting(): function save_user_avatar (line 178) | def save_user_avatar(url): function delete_sidebar_cache (line 206) | def delete_sidebar_cache(): function delete_view_cache (line 214) | def delete_view_cache(prefix, keys): function get_resource_url (line 220) | def get_resource_url(): function class_filter (line 248) | def class_filter(tag, name, value): function sanitize_html (line 274) | def sanitize_html(html): FILE: djangoblog/whoosh_cn_backend.py class WhooshHtmlFormatter (line 56) | class WhooshHtmlFormatter(HtmlFormatter): class WhooshSearchBackend (line 65) | class WhooshSearchBackend(BaseSearchBackend): method __init__ (line 82) | def __init__(self, connection_alias, **connection_options): method setup (line 106) | def setup(self): method build_schema (line 147) | def build_schema(self, fields): method update (line 202) | def update(self, index, iterable, commit=True): method remove (line 247) | def remove(self, obj_or_string, commit=True): method clear (line 269) | def clear(self, models=None, commit=True): method delete_index (line 306) | def delete_index(self): method optimize (line 317) | def optimize(self): method calculate_page (line 324) | def calculate_page(self, start_offset=0, end_offset=None): method search (line 349) | def search( method more_like_this (line 563) | def more_like_this( method _process_results (line 678) | def _process_results( method create_spelling_suggestion (line 819) | def create_spelling_suggestion(self, query_string): method _from_python (line 848) | def _from_python(self, value): method _to_python (line 871) | def _to_python(self, value): class WhooshSearchQuery (line 922) | class WhooshSearchQuery(BaseSearchQuery): method _convert_datetime (line 923) | def _convert_datetime(self, date): method clean (line 929) | def clean(self, query_fragment): method build_query_fragment (line 954) | def build_query_fragment(self, field, filter_type, value): class WhooshEngine (line 1091) | class WhooshEngine(BaseEngine): FILE: frontend/src/components/backToTop.js method init (line 12) | init() { method destroy (line 24) | destroy() { method checkScroll (line 29) | checkScroll() { method scrollToTop (line 35) | scrollToTop() { method debounce (line 59) | debounce(func, wait) { FILE: frontend/src/components/commentSystem.js method init (line 16) | init() { method loadComments (line 28) | async loadComments() { method startReply (line 49) | startReply(commentId) { method cancelReply (line 64) | cancelReply() { method submitReply (line 71) | async submitReply(commentId) { method submitComment (line 103) | async submitComment() { method getCsrfToken (line 152) | getCsrfToken() { method showNotification (line 169) | showNotification(message) { method isReplying (line 183) | isReplying(commentId) { method canReply (line 187) | canReply() { FILE: frontend/src/components/imageLightbox.js function imageLightbox (line 5) | function imageLightbox() { FILE: frontend/src/components/navigation.js method init (line 14) | init() { method toggleMenu (line 37) | toggleMenu() { method closeMobileMenu (line 52) | closeMobileMenu() { method toggleSearch (line 58) | toggleSearch() { method submitSearch (line 71) | submitSearch() { method toggleTheme (line 78) | toggleTheme() { FILE: frontend/src/components/reactionPicker.js method init (line 14) | init() { method loadFromDataAttribute (line 20) | loadFromDataAttribute() { method loadFromAPI (line 37) | async loadFromAPI() { method formatUsersText (line 65) | formatUsersText(users, totalCount) { method isAuthenticated (line 89) | isAuthenticated() { method showLoginPrompt (line 94) | showLoginPrompt() { method toggleReaction (line 151) | async toggleReaction(emoji) { method showNotification (line 214) | showNotification(message, type = 'info') { method getCsrfToken (line 249) | getCsrfToken() { FILE: frontend/src/features/darkMode.js constant STORAGE_KEY (line 6) | const STORAGE_KEY = 'dark-mode-enabled'; constant THEME_ATTR (line 7) | const THEME_ATTR = 'data-theme'; constant ENABLE_SYSTEM (line 8) | const ENABLE_SYSTEM = true; function getPreferredTheme (line 13) | function getPreferredTheme() { function applyTheme (line 34) | function applyTheme(theme) { function getCurrentTheme (line 47) | function getCurrentTheme() { function setTheme (line 54) | function setTheme(theme) { function toggleTheme (line 75) | function toggleTheme() { function initTheme (line 85) | function initTheme() { function setupKeyboardShortcut (line 93) | function setupKeyboardShortcut() { function setupSystemThemeListener (line 105) | function setupSystemThemeListener() { function initDarkMode (line 127) | function initDarkMode() { FILE: frontend/src/utils/nprogress.js method configure (line 18) | configure(options) { method set (line 23) | set(n) { method isStarted (line 54) | isStarted() { method start (line 58) | start() { method done (line 74) | done(force) { method inc (line 79) | inc(amount) { method trickle (line 94) | trickle() { method render (line 98) | render(fromStart) { method remove (line 120) | remove() { method isRendered (line 125) | isRendered() { method clamp (line 129) | clamp(n, min, max) { method toBarPerc (line 135) | toBarPerc(n) { function next (line 142) | function next() { FILE: oauth/admin.py class OAuthUserAdmin (line 11) | class OAuthUserAdmin(admin.ModelAdmin): method get_readonly_fields (line 26) | def get_readonly_fields(self, request, obj=None): method has_add_permission (line 31) | def has_add_permission(self, request): method link_to_usermodel (line 34) | def link_to_usermodel(self, obj): method show_user_image (line 42) | def show_user_image(self, obj): class OAuthConfigAdmin (line 52) | class OAuthConfigAdmin(admin.ModelAdmin): FILE: oauth/apps.py class OauthConfig (line 4) | class OauthConfig(AppConfig): FILE: oauth/forms.py class RequireEmailForm (line 5) | class RequireEmailForm(forms.Form): method __init__ (line 9) | def __init__(self, *args, **kwargs): FILE: oauth/migrations/0001_initial.py class Migration (line 9) | class Migration(migrations.Migration): FILE: oauth/migrations/0002_alter_oauthconfig_options_alter_oauthuser_options_and_more.py class Migration (line 9) | class Migration(migrations.Migration): FILE: oauth/migrations/0003_alter_oauthuser_nickname.py class Migration (line 6) | class Migration(migrations.Migration): FILE: oauth/models.py class OAuthUser (line 9) | class OAuthUser(models.Model): method __str__ (line 26) | def __str__(self): class Meta (line 29) | class Meta: class OAuthConfig (line 35) | class OAuthConfig(models.Model): method clean (line 56) | def clean(self): method __str__ (line 61) | def __str__(self): class Meta (line 64) | class Meta: FILE: oauth/oauthmanager.py class OAuthAccessTokenException (line 15) | class OAuthAccessTokenException(Exception): class BaseOauthManager (line 21) | class BaseOauthManager(metaclass=ABCMeta): method __init__ (line 31) | def __init__(self, access_token=None, openid=None): method is_access_token_set (line 36) | def is_access_token_set(self): method is_authorized (line 40) | def is_authorized(self): method get_authorization_url (line 44) | def get_authorization_url(self, nexturl='/'): method get_access_token_by_code (line 48) | def get_access_token_by_code(self, code): method get_oauth_userinfo (line 52) | def get_oauth_userinfo(self): method get_picture (line 56) | def get_picture(self, metadata): method do_get (line 59) | def do_get(self, url, params, headers=None): method do_post (line 64) | def do_post(self, url, params, headers=None): method get_config (line 69) | def get_config(self): class WBOauthManager (line 74) | class WBOauthManager(BaseOauthManager): method __init__ (line 80) | def __init__(self, access_token=None, openid=None): method get_authorization_url (line 91) | def get_authorization_url(self, nexturl='/'): method get_access_token_by_code (line 100) | def get_access_token_by_code(self, code): method get_oauth_userinfo (line 119) | def get_oauth_userinfo(self): method get_picture (line 144) | def get_picture(self, metadata): class ProxyManagerMixin (line 149) | class ProxyManagerMixin: method __init__ (line 150) | def __init__(self, *args, **kwargs): method do_get (line 159) | def do_get(self, url, params, headers=None): method do_post (line 164) | def do_post(self, url, params, headers=None): class GoogleOauthManager (line 170) | class GoogleOauthManager(ProxyManagerMixin, BaseOauthManager): method __init__ (line 176) | def __init__(self, access_token=None, openid=None): method get_authorization_url (line 187) | def get_authorization_url(self, nexturl='/'): method get_access_token_by_code (line 197) | def get_access_token_by_code(self, code): method get_oauth_userinfo (line 218) | def get_oauth_userinfo(self): method get_picture (line 243) | def get_picture(self, metadata): class GitHubOauthManager (line 248) | class GitHubOauthManager(ProxyManagerMixin, BaseOauthManager): method __init__ (line 254) | def __init__(self, access_token=None, openid=None): method get_authorization_url (line 265) | def get_authorization_url(self, next_url='/'): method get_access_token_by_code (line 275) | def get_access_token_by_code(self, code): method get_oauth_userinfo (line 294) | def get_oauth_userinfo(self): method get_picture (line 316) | def get_picture(self, metadata): class FaceBookOauthManager (line 321) | class FaceBookOauthManager(ProxyManagerMixin, BaseOauthManager): method __init__ (line 327) | def __init__(self, access_token=None, openid=None): method get_authorization_url (line 338) | def get_authorization_url(self, next_url='/'): method get_access_token_by_code (line 348) | def get_access_token_by_code(self, code): method get_oauth_userinfo (line 367) | def get_oauth_userinfo(self): method get_picture (line 390) | def get_picture(self, metadata): class QQOauthManager (line 395) | class QQOauthManager(BaseOauthManager): method __init__ (line 402) | def __init__(self, access_token=None, openid=None): method get_authorization_url (line 413) | def get_authorization_url(self, next_url='/'): method get_access_token_by_code (line 422) | def get_access_token_by_code(self, code): method get_open_id (line 440) | def get_open_id(self): method get_oauth_userinfo (line 456) | def get_oauth_userinfo(self): method get_picture (line 479) | def get_picture(self, metadata): function get_oauth_apps (line 485) | def get_oauth_apps(): function get_manager_by_type (line 495) | def get_manager_by_type(type): FILE: oauth/templatetags/oauth_tags.py function load_oauth_applications (line 10) | def load_oauth_applications(request): FILE: oauth/test_oauth_business_logic.py class OAuthConfigTest (line 11) | class OAuthConfigTest(TestCase): method test_oauth_config_can_be_created (line 14) | def test_oauth_config_can_be_created(self): method test_oauth_config_has_required_fields (line 27) | def test_oauth_config_has_required_fields(self): method test_oauth_config_type_uniqueness (line 41) | def test_oauth_config_type_uniqueness(self): method test_oauth_config_query_by_type (line 64) | def test_oauth_config_query_by_type(self): method test_oauth_config_is_enable_field (line 85) | def test_oauth_config_is_enable_field(self): class OAuthUserTest (line 105) | class OAuthUserTest(TestCase): method setUp (line 108) | def setUp(self): method test_oauth_user_can_be_created (line 116) | def test_oauth_user_can_be_created(self): method test_oauth_user_links_to_blog_user (line 130) | def test_oauth_user_links_to_blog_user(self): method test_oauth_user_has_openid (line 146) | def test_oauth_user_has_openid(self): method test_oauth_user_has_type (line 158) | def test_oauth_user_has_type(self): method test_oauth_user_token_storage (line 170) | def test_oauth_user_token_storage(self): method test_oauth_user_nickname_storage (line 183) | def test_oauth_user_nickname_storage(self): class OAuthUserQueryTest (line 197) | class OAuthUserQueryTest(TestCase): method setUp (line 200) | def setUp(self): method test_query_oauth_user_by_openid (line 214) | def test_query_oauth_user_by_openid(self): method test_query_oauth_user_by_type (line 228) | def test_query_oauth_user_by_type(self): method test_query_oauth_users_by_blog_user (line 256) | def test_query_oauth_users_by_blog_user(self): method test_user_can_have_multiple_oauth_accounts (line 281) | def test_user_can_have_multiple_oauth_accounts(self): class OAuthUserBindingTest (line 299) | class OAuthUserBindingTest(TestCase): method setUp (line 302) | def setUp(self): method test_bind_oauth_to_existing_user (line 310) | def test_bind_oauth_to_existing_user(self): method test_unbind_oauth_from_user (line 327) | def test_unbind_oauth_from_user(self): method test_change_oauth_binding (line 349) | def test_change_oauth_binding(self): class OAuthTokenManagementTest (line 373) | class OAuthTokenManagementTest(TestCase): method setUp (line 376) | def setUp(self): method test_oauth_token_can_be_updated (line 384) | def test_oauth_token_can_be_updated(self): method test_oauth_user_token_storage (line 402) | def test_oauth_user_token_storage(self): class OAuthUserDeletionTest (line 418) | class OAuthUserDeletionTest(TestCase): method setUp (line 421) | def setUp(self): method test_delete_oauth_user (line 429) | def test_delete_oauth_user(self): method test_delete_blog_user_cascade_oauth (line 448) | def test_delete_blog_user_cascade_oauth(self): class OAuthMetadataTest (line 469) | class OAuthMetadataTest(TestCase): method setUp (line 472) | def setUp(self): method test_oauth_user_metadata_field (line 480) | def test_oauth_user_metadata_field(self): method test_oauth_user_email_field (line 499) | def test_oauth_user_email_field(self): FILE: oauth/tests.py class OAuthConfigTest (line 15) | class OAuthConfigTest(TestCase): method setUp (line 16) | def setUp(self): method test_oauth_login_test (line 23) | def test_oauth_login_test(self): class OauthLoginTest (line 39) | class OauthLoginTest(TestCase): method setUp (line 40) | def setUp(self) -> None: method init_apps (line 48) | def init_apps(self): method get_app_by_type (line 58) | def get_app_by_type(self, type): method test_weibo_login (line 65) | def test_weibo_login(self, mock_do_get, mock_do_post): method test_google_login (line 84) | def test_google_login(self, mock_do_get, mock_do_post): method test_github_login (line 105) | def test_github_login(self, mock_do_get, mock_do_post): method test_facebook_login (line 125) | def test_facebook_login(self, mock_do_get, mock_do_post): method test_qq_login (line 157) | def test_qq_login(self, mock_do_get): method test_weibo_authoriz_login_with_email (line 168) | def test_weibo_authoriz_login_with_email(self, mock_do_get, mock_do_po... method test_weibo_authoriz_login_without_email (line 208) | def test_weibo_authoriz_login_without_email(self, mock_do_get, mock_do... FILE: oauth/views.py function get_redirecturl (line 30) | def get_redirecturl(request): function oauthlogin (line 48) | def oauthlogin(request): function authorize (line 60) | def authorize(request): function emailconfirm (line 143) | def emailconfirm(request, id, sign): class RequireEmailView (line 200) | class RequireEmailView(FormView): method get (line 204) | def get(self, request, *args, **kwargs): method get_initial (line 213) | def get_initial(self): method get_context_data (line 220) | def get_context_data(self, **kwargs): method form_valid (line 227) | def form_valid(self, form): function bindsuccess (line 263) | def bindsuccess(request, oauthid): FILE: owntracks/admin.py class OwnTrackLogsAdmin (line 6) | class OwnTrackLogsAdmin(admin.ModelAdmin): FILE: owntracks/apps.py class OwntracksConfig (line 4) | class OwntracksConfig(AppConfig): FILE: owntracks/migrations/0001_initial.py class Migration (line 7) | class Migration(migrations.Migration): FILE: owntracks/migrations/0002_alter_owntracklog_options_and_more.py class Migration (line 6) | class Migration(migrations.Migration): FILE: owntracks/models.py class OwnTrackLog (line 7) | class OwnTrackLog(models.Model): method __str__ (line 13) | def __str__(self): class Meta (line 16) | class Meta: FILE: owntracks/tests.py class OwnTrackLogTest (line 11) | class OwnTrackLogTest(TestCase): method setUp (line 12) | def setUp(self): method test_own_track_log (line 16) | def test_own_track_log(self): FILE: owntracks/views.py function manage_owntrack_log (line 23) | def manage_owntrack_log(request): function show_maps (line 48) | def show_maps(request): function show_log_dates (line 62) | def show_log_dates(request): function convert_to_amap (line 72) | def convert_to_amap(locations): function get_datas (line 98) | def get_datas(request): FILE: plugins/article_copyright/plugin.py class ArticleCopyrightPlugin (line 6) | class ArticleCopyrightPlugin(BasePlugin): method register_hooks (line 13) | def register_hooks(self): method add_copyright_to_content (line 17) | def add_copyright_to_content(self, content, *args, **kwargs): FILE: plugins/article_recommendation/plugin.py class ArticleRecommendationPlugin (line 10) | class ArticleRecommendationPlugin(BasePlugin): method register_hooks (line 32) | def register_hooks(self): method on_article_detail_load (line 36) | def on_article_detail_load(self, article, context, request, *args, **k... method should_display (line 42) | def should_display(self, position, context, **kwargs): method render_article_bottom_widget (line 53) | def render_article_bottom_widget(self, context, **kwargs): method render_sidebar_widget (line 83) | def render_sidebar_widget(self, context, **kwargs): method get_css_files (line 119) | def get_css_files(self): method get_js_files (line 123) | def get_js_files(self): method get_recommendations (line 127) | def get_recommendations(self, article, count=5): method get_popular_articles (line 197) | def get_popular_articles(self, count=3): FILE: plugins/article_recommendation/static/article_recommendation/js/recommendation.js function initRecommendations (line 13) | function initRecommendations() { function trackRecommendationClicks (line 21) | function trackRecommendationClicks() { function lazyLoadRecommendations (line 44) | function lazyLoadRecommendations() { function addAnimations (line 71) | function addAnimations() { FILE: plugins/cloudflare_cache/api.py class CloudflareAPI (line 14) | class CloudflareAPI: method __init__ (line 19) | def __init__(self, zone_id: str, api_token: str): method purge_urls (line 34) | def purge_urls(self, urls: List[str]) -> Dict: method purge_all (line 95) | def purge_all(self) -> Dict: method purge_by_tags (line 132) | def purge_by_tags(self, tags: List[str]) -> Dict: method validate_credentials (line 172) | def validate_credentials(self) -> bool: FILE: plugins/cloudflare_cache/handlers.py class CloudflareCacheHandler (line 14) | class CloudflareCacheHandler: method __init__ (line 17) | def __init__(self, config: dict): method on_model_save (line 35) | def on_model_save(self, sender, instance, created, update_fields, **kw... method _collect_article_urls (line 78) | def _collect_article_urls(self, article, is_new: bool) -> List[str]: method _collect_comment_urls (line 142) | def _collect_comment_urls(self, comment, is_new: bool) -> List[str]: method _purge_cache_batch (line 178) | def _purge_cache_batch(self, urls: List[str]): method purge_all (line 215) | def purge_all(self): FILE: plugins/cloudflare_cache/plugin.py class CloudflareCachePlugin (line 28) | class CloudflareCachePlugin(BasePlugin): method init_plugin (line 66) | def init_plugin(self): method _validate_config (line 93) | def _validate_config(self) -> bool: method _test_api_connection (line 122) | def _test_api_connection(self): method _purge_on_startup (line 141) | def _purge_on_startup(self): method register_hooks (line 181) | def register_hooks(self): method purge_all_cache (line 226) | def purge_all_cache(self): method get_plugin_status (line 246) | def get_plugin_status(self) -> dict: FILE: plugins/external_links/plugin.py class ExternalLinksPlugin (line 8) | class ExternalLinksPlugin(BasePlugin): method register_hooks (line 14) | def register_hooks(self): method process_external_links (line 17) | def process_external_links(self, content, *args, **kwargs): FILE: plugins/image_lazy_loading/plugin.py class ImageOptimizationPlugin (line 9) | class ImageOptimizationPlugin(BasePlugin): method __init__ (line 15) | def __init__(self): method register_hooks (line 27) | def register_hooks(self): method optimize_images (line 30) | def optimize_images(self, content, *args, **kwargs): method _parse_img_attributes (line 66) | def _parse_img_attributes(self, attr_string): method _apply_optimizations (line 82) | def _apply_optimizations(self, attrs, image_index): method _build_img_tag (line 153) | def _build_img_tag(self, attrs): method _get_current_domain (line 170) | def _get_current_domain(self): FILE: plugins/reading_time/plugin.py class ReadingTimePlugin (line 8) | class ReadingTimePlugin(BasePlugin): method register_hooks (line 14) | def register_hooks(self): method add_reading_time (line 17) | def add_reading_time(self, content, *args, **kwargs): FILE: plugins/seo_optimizer/plugin.py class SeoOptimizerPlugin (line 10) | class SeoOptimizerPlugin(BasePlugin): method register_hooks (line 16) | def register_hooks(self): method _get_article_seo_data (line 19) | def _get_article_seo_data(self, context, request, blog_setting): method _get_category_seo_data (line 73) | def _get_category_seo_data(self, context, request, blog_setting): method _get_tag_seo_data (line 99) | def _get_tag_seo_data(self, context, request, blog_setting): method _get_author_seo_data (line 127) | def _get_author_seo_data(self, context, request, blog_setting): method _get_default_seo_data (line 151) | def _get_default_seo_data(self, context, request, blog_setting): method dispatch_seo_generation (line 170) | def dispatch_seo_generation(self, metas, context): FILE: plugins/view_count/plugin.py class ViewCountPlugin (line 5) | class ViewCountPlugin(BasePlugin): method register_hooks (line 11) | def register_hooks(self): method record_view (line 14) | def record_view(self, article, *args, **kwargs): FILE: servermanager/MemcacheStorage.py class MemcacheStorage (line 7) | class MemcacheStorage(SessionStorage): method __init__ (line 8) | def __init__(self, prefix='ws_'): method is_available (line 13) | def is_available(self): method key_name (line 18) | def key_name(self, s): method get (line 21) | def get(self, id): method set (line 26) | def set(self, id, value): method delete (line 30) | def delete(self, id): FILE: servermanager/admin.py class CommandsAdmin (line 5) | class CommandsAdmin(admin.ModelAdmin): class EmailSendLogAdmin (line 9) | class EmailSendLogAdmin(admin.ModelAdmin): method has_add_permission (line 18) | def has_add_permission(self, request): FILE: servermanager/api/blogapi.py class BlogApi (line 6) | class BlogApi: method __init__ (line 7) | def __init__(self): method search_articles (line 12) | def search_articles(self, query): method get_category_lists (line 17) | def get_category_lists(self): method get_category_articles (line 20) | def get_category_articles(self, categoryname): method get_recent_articles (line 26) | def get_recent_articles(self): FILE: servermanager/api/commonapi.py class ChatGPT (line 15) | class ChatGPT: method chat (line 18) | def chat(prompt): class CommandHandler (line 28) | class CommandHandler: method __init__ (line 29) | def __init__(self): method run (line 32) | def run(self, title): method __run_command__ (line 47) | def __run_command__(self, cmd): method get_help (line 54) | def get_help(self): FILE: servermanager/apps.py class ServermanagerConfig (line 4) | class ServermanagerConfig(AppConfig): FILE: servermanager/migrations/0001_initial.py class Migration (line 6) | class Migration(migrations.Migration): FILE: servermanager/migrations/0002_alter_emailsendlog_options_and_more.py class Migration (line 6) | class Migration(migrations.Migration): FILE: servermanager/models.py class commands (line 5) | class commands(models.Model): method __str__ (line 12) | def __str__(self): class Meta (line 15) | class Meta: class EmailSendLog (line 20) | class EmailSendLog(models.Model): method __str__ (line 27) | def __str__(self): class Meta (line 30) | class Meta: FILE: servermanager/robot.py function convert_to_article_reply (line 31) | def convert_to_article_reply(articles, message): function search (line 50) | def search(message, session): function category (line 63) | def category(message, session): function recents (line 70) | def recents(message, session): function help (line 80) | def help(message, session): function weather (line 102) | def weather(message, session): function idcard (line 107) | def idcard(message, session): function echo (line 112) | def echo(message, session): class MessageHandler (line 117) | class MessageHandler: method __init__ (line 118) | def __init__(self, message, session): method is_admin (line 131) | def is_admin(self): method is_password_set (line 135) | def is_password_set(self): method save_session (line 138) | def save_session(self): method handler (line 142) | def handler(self): class WxUserInfo (line 182) | class WxUserInfo(): method __init__ (line 183) | def __init__(self): FILE: servermanager/tests.py class ServerManagerTest (line 14) | class ServerManagerTest(TestCase): method setUp (line 15) | def setUp(self): method test_chat_gpt (line 19) | def test_chat_gpt(self): method test_validate_comment (line 23) | def test_validate_comment(self):