id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
18,100
test_threads_lists_mark_as_read.py
rafalp_Misago/misago/threads/tests/test_threads_lists_mark_as_read.py
from django.urls import reverse from ...conf.test import override_dynamic_settings from ...readtracker.models import ReadCategory, ReadThread from ...test import assert_contains @override_dynamic_settings(index_view="categories") def test_site_threads_list_mark_as_read_redirects_guests(db, client): response = cl...
9,008
Python
.py
250
29.912
102
0.682487
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,101
test_threads_filters.py
rafalp_Misago/misago/threads/tests/test_threads_filters.py
from datetime import timedelta from unittest.mock import Mock from django.utils import timezone from ...readtracker.models import ReadCategory, ReadThread from ..filters import ( MyThreadsFilter, UnapprovedThreadsFilter, UnreadThreadsFilter, ) from ..models import Thread from ..test import post_thread d...
8,906
Python
.py
225
34.257778
86
0.71593
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,102
test_attachments_middleware.py
rafalp_Misago/misago/threads/tests/test_attachments_middleware.py
from unittest.mock import Mock import pytest from rest_framework import serializers from .. import test from ...conf.test import override_dynamic_settings from ..api.postingendpoint import PostingEndpoint from ..api.postingendpoint.attachments import ( AttachmentsMiddleware, validate_attachments_count, ) from...
9,916
Python
.py
235
36.638298
87
0.722592
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,103
test_thread_postmove_api.py
rafalp_Misago/misago/threads/tests/test_thread_postmove_api.py
import json from django.urls import reverse from .. import test from ...categories.models import Category from ...conf.test import override_dynamic_settings from ...users.test import AuthenticatedUserTestCase from ..models import Thread from ..test import patch_category_acl, patch_other_category_acl class ThreadPos...
19,475
Python
.py
465
31.32043
88
0.585234
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,104
test_paginator.py
rafalp_Misago/misago/threads/tests/test_paginator.py
from itertools import product from django.test import TestCase from ..paginator import PostsPaginator class PostsPaginatorTests(TestCase): def test_paginator(self): """pages share first and last items with each other""" items = [i + 1 for i in range(30)] paginator = PostsPaginator(items...
3,343
Python
.py
78
30.923077
86
0.51016
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,105
test_anonymize_data.py
rafalp_Misago/misago/threads/tests/test_anonymize_data.py
from unittest.mock import patch from django.test import RequestFactory from django.urls import reverse from .. import test from ...cache.versions import get_cache_versions from ...categories.models import Category from ...conf.dynamicsettings import DynamicSettings from ...users.test import AuthenticatedUserTestCase,...
8,758
Python
.py
205
32.517073
88
0.616561
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,106
test_posts_moderation.py
rafalp_Misago/misago/threads/tests/test_posts_moderation.py
from .. import moderation, test from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase from ..models import Post, Thread class PostsModerationTests(AuthenticatedUserTestCase): def setUp(self): super().setUp() self.category = Category.objects.all_categories()...
3,746
Python
.py
76
41.092105
75
0.689334
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,107
test_attachments_proxy.py
rafalp_Misago/misago/threads/tests/test_attachments_proxy.py
import pytest from django.urls import reverse from ...acl.models import Role from ...acl.test import patch_user_acl from ...conf import settings from ...conf.test import override_dynamic_settings from ..models import Attachment, AttachmentType @pytest.fixture def attachment_type(db): return AttachmentType.object...
8,186
Python
.py
208
34.163462
87
0.722264
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,108
test_thread_postdelete_api.py
rafalp_Misago/misago/threads/tests/test_thread_postdelete_api.py
from datetime import timedelta from django.urls import reverse from django.utils import timezone from .. import test from ..models import Post, Thread from ..test import patch_category_acl from .test_threads_api import ThreadsApiTestCase class PostDeleteApiTests(ThreadsApiTestCase): def setUp(self): sup...
9,157
Python
.py
215
33.706977
88
0.621306
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,109
test_mergeconflict.py
rafalp_Misago/misago/threads/tests/test_mergeconflict.py
from django.test import TestCase from rest_framework.exceptions import ValidationError from .. import test from ...categories.models import Category from ...users.test import create_test_user from ..mergeconflict import MergeConflict class MergeConflictTests(TestCase): def setUp(self): self.category = Ca...
14,037
Python
.py
295
36.237288
87
0.606231
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,110
test_thread_postbulkpatch_api.py
rafalp_Misago/misago/threads/tests/test_thread_postbulkpatch_api.py
import json from django.urls import reverse from .. import test from ...categories.models import Category from ...conf.test import override_dynamic_settings from ...users.test import AuthenticatedUserTestCase from ..models import Post, Thread from ..test import patch_category_acl class ThreadPostBulkPatchApiTestCas...
8,732
Python
.py
207
32.033816
85
0.578643
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,111
test_updatepostschecksums.py
rafalp_Misago/misago/threads/tests/test_updatepostschecksums.py
from io import StringIO from django.core.management import call_command from django.test import TestCase from .. import test from ...categories.models import Category from ..management.commands import updatepostschecksums from ..models import Post class UpdatePostsChecksumsTests(TestCase): def test_no_posts_to_...
1,426
Python
.py
32
36.90625
70
0.677046
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,112
test_thread_model.py
rafalp_Misago/misago/threads/tests/test_thread_model.py
from datetime import timedelta from django.test import TestCase from django.utils import timezone from .. import test from ...categories.models import Category from ...users.test import create_test_user from ..models import Poll, Post, Thread, ThreadParticipant class ThreadModelTests(TestCase): def setUp(self):...
15,738
Python
.py
351
34.652422
83
0.639141
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,113
test_get_thread_url.py
rafalp_Misago/misago/threads/tests/test_get_thread_url.py
from django.urls import reverse from ..models import Thread from ..threadurl import get_thread_url def test_get_thread_url_returns_thread_url(django_assert_num_queries, thread): with django_assert_num_queries(0): url = get_thread_url(thread) assert url == reverse( "misago:thread", kwargs={"i...
1,558
Python
.py
37
36.756757
78
0.704907
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,114
test_threads_lists_moderation.py
rafalp_Misago/misago/threads/tests/test_threads_lists_moderation.py
from django.urls import reverse from ...conf.test import override_dynamic_settings from ...permissions.models import Moderator from ...test import assert_contains, assert_not_contains from ..test import post_thread MODERATION_FORM_HTML = '<form id="threads-moderation" method="post">' MODERATION_FIXED_HTML = '<div cla...
27,822
Python
.py
684
35.209064
96
0.706258
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,115
test_search.py
rafalp_Misago/misago/threads/tests/test_search.py
from django.urls import reverse from .. import test from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase def index_post(post): if post.id == post.thread.first_post_id: post.set_search_document(post.thread.title) else: post.set_search_document() pos...
8,322
Python
.py
175
37.897143
86
0.61684
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,116
test_thread_postedits_api.py
rafalp_Misago/misago/threads/tests/test_thread_postedits_api.py
from django.urls import reverse from .. import test from ..test import patch_category_acl from .test_threads_api import ThreadsApiTestCase class ThreadPostEditsApiTestCase(ThreadsApiTestCase): def setUp(self): super().setUp() self.post = test.reply_thread(self.thread, poster=self.user) ...
6,413
Python
.py
139
36.42446
85
0.622614
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,117
test_utils.py
rafalp_Misago/misago/threads/tests/test_utils.py
from django.test import TestCase from .. import test from ...categories.models import Category from ..utils import add_categories_to_items, get_thread_id_from_url class AddCategoriesToItemsTests(TestCase): def setUp(self): """ Create categories tree for test cases: First category (create...
10,460
Python
.py
227
33.9163
85
0.560495
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,118
test_threads_list_read_category.py
rafalp_Misago/misago/threads/tests/test_threads_list_read_category.py
from datetime import timedelta from django.utils import timezone from ...readtracker.models import ReadCategory, ReadThread from ..test import post_thread def test_unread_category_without_unread_threads_is_marked_read( default_category, user, user_client ): user.joined_on -= timedelta(minutes=60) user.s...
3,075
Python
.py
89
27.842697
86
0.679851
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,119
test_thread_postmerge_api.py
rafalp_Misago/misago/threads/tests/test_thread_postmerge_api.py
import json from django.urls import reverse from .. import test from ...categories.models import Category from ...conf.test import override_dynamic_settings from ...users.test import AuthenticatedUserTestCase from ..models import Post from ..test import patch_category_acl class ThreadPostMergeApiTestCase(Authentica...
23,286
Python
.py
557
30.308797
88
0.567076
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,120
test_participants.py
rafalp_Misago/misago/threads/tests/test_participants.py
from django.test import TestCase from django.utils import timezone from ...categories.models import Category from ...users.test import create_test_user from ..models import Post, Thread, ThreadParticipant from ..participants import ( add_participants, has_participants, make_participants_aware, set_owne...
7,531
Python
.py
164
36.810976
85
0.659336
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,121
test_privatethreads.py
rafalp_Misago/misago/threads/tests/test_privatethreads.py
from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase class PrivateThreadsTestCase(AuthenticatedUserTestCase): def setUp(self): super().setUp() self.category = Category.objects.private_threads()
257
Python
.py
6
38.166667
58
0.7751
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,122
test_thread_reply_api.py
rafalp_Misago/misago/threads/tests/test_thread_reply_api.py
from unittest.mock import patch from django.urls import reverse from .. import test from ...acl.test import patch_user_acl from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase from ..models import Thread from ..test import patch_category_acl class ReplyThreadTests(Authentica...
12,664
Python
.py
264
39.106061
87
0.657669
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,123
test_private_threads_list_read_category.py
rafalp_Misago/misago/threads/tests/test_private_threads_list_read_category.py
from datetime import timedelta from django.urls import reverse from django.utils import timezone from ...readtracker.models import ReadCategory, ReadThread from ..models import Thread, ThreadParticipant from ..test import post_thread def make_user_participant(user): for thread in Thread.objects.all(): T...
4,616
Python
.py
129
28.914729
86
0.684211
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,124
test_thread_start_api.py
rafalp_Misago/misago/threads/tests/test_thread_start_api.py
from django.urls import reverse from ...acl.test import patch_user_acl from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase from ..test import patch_category_acl class StartThreadTests(AuthenticatedUserTestCase): def setUp(self): super().setUp() self.cate...
20,087
Python
.py
469
31.842217
86
0.579179
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,125
test_thread_postlikes_api.py
rafalp_Misago/misago/threads/tests/test_thread_postlikes_api.py
from django.urls import reverse from .. import test from ..serializers import PostLikeSerializer from ..test import patch_category_acl from .test_threads_api import ThreadsApiTestCase class ThreadPostLikesApiTestCase(ThreadsApiTestCase): def setUp(self): super().setUp() self.post = test.reply_th...
4,057
Python
.py
99
26.79798
88
0.507224
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,126
test_redirects_views.py
rafalp_Misago/misago/threads/tests/test_redirects_views.py
from django.urls import reverse from django.utils import timezone from ...readtracker.models import ReadCategory from ...readtracker.tracker import mark_thread_read from ...test import assert_contains from ..test import reply_thread def test_thread_last_post_redirect_view_returns_redirect(client, thread): reply ...
13,599
Python
.py
406
26.133005
111
0.619676
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,127
test_synchronizethreads.py
rafalp_Misago/misago/threads/tests/test_synchronizethreads.py
from io import StringIO from django.core.management import call_command from django.test import TestCase from .. import test from ...categories.models import Category from ..management.commands import synchronizethreads class SynchronizeThreadsTests(TestCase): def test_no_threads_sync(self): """command ...
1,358
Python
.py
30
37.333333
67
0.674772
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,128
test_post_model.py
rafalp_Misago/misago/threads/tests/test_post_model.py
from datetime import timedelta from django.test import TestCase from django.utils import timezone from ...categories.models import Category from ...users.test import create_test_user from ..checksums import update_post_checksum from ..models import Post, Thread class PostModelTests(TestCase): def setUp(self): ...
7,152
Python
.py
175
28.342857
76
0.557571
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,129
test_threads_lists_views.py
rafalp_Misago/misago/threads/tests/test_threads_lists_views.py
from unittest.mock import patch from django.urls import reverse from ...categories.models import Category from ...conf.test import override_dynamic_settings from ...pagination.cursor import EmptyPageError from ...permissions.enums import CategoryPermission from ...permissions.models import CategoryGroupPermission fro...
23,457
Python
.py
490
42.946939
98
0.739784
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,130
test_privatethread_reply_api.py
rafalp_Misago/misago/threads/tests/test_privatethread_reply_api.py
from unittest.mock import patch from .. import test from ...users.test import create_test_user from ..models import ThreadParticipant from .test_privatethreads import PrivateThreadsTestCase class PrivateThreadReplyApiTestCase(PrivateThreadsTestCase): def setUp(self): super().setUp() self.thread ...
1,564
Python
.py
32
41.40625
85
0.706114
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,131
test_new_reply_notification.py
rafalp_Misago/misago/threads/tests/test_new_reply_notification.py
from django.urls import reverse from ..models import ThreadParticipant def test_notify_about_new_reply_task_is_triggered_by_new_thread_reply( notify_on_new_thread_reply_mock, user_client, thread ): response = user_client.post( reverse("misago:api:thread-post-list", kwargs={"thread_pk": thread.pk}), ...
3,346
Python
.py
98
27.27551
88
0.643278
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,132
test_privatethread_start_api.py
rafalp_Misago/misago/threads/tests/test_privatethread_start_api.py
from unittest.mock import patch from django.contrib.auth import get_user_model from django.urls import reverse from ...acl.test import patch_user_acl from ...categories.models import Category from ...conf.test import override_dynamic_settings from ...users.test import AuthenticatedUserTestCase, create_test_user from ...
13,621
Python
.py
333
29.42042
89
0.562665
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,133
test_treesmap.py
rafalp_Misago/misago/threads/tests/test_treesmap.py
from django.test import TestCase from ...categories.models import Category from ..threadtypes.treesmap import TreesMap THREAD_TYPE = "misago.threads.threadtypes.thread.Thread" class TreesMapTests(TestCase): def test_load_types(self): """TreesMap().load_types() loads types modules""" trees_map = ...
4,310
Python
.py
92
36.913043
87
0.619275
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,134
test_thread_pollcreate_api.py
rafalp_Misago/misago/threads/tests/test_thread_pollcreate_api.py
from django.urls import reverse from ...acl.test import patch_user_acl from ..models import Poll, Thread from ..serializers.poll import MAX_POLL_OPTIONS from ..test import patch_category_acl from .test_thread_poll_api import ThreadPollApiTestCase class ThreadPollCreateTests(ThreadPollApiTestCase): def test_anony...
11,084
Python
.py
252
34.392857
88
0.610632
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,135
test_clearattachments.py
rafalp_Misago/misago/threads/tests/test_clearattachments.py
from datetime import timedelta from io import StringIO import pytest from django.core import management from django.utils import timezone from ...conf.test import override_dynamic_settings from ..management.commands import clearattachments from ..models import Attachment, AttachmentType @pytest.fixture def attachme...
2,197
Python
.py
49
40.285714
70
0.752582
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,136
test_threads_moderation.py
rafalp_Misago/misago/threads/tests/test_threads_moderation.py
from .. import moderation, test from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase from ..models import Thread class MockRequest: def __init__(self, user): self.user = user self.user_ip = "123.14.15.222" class ThreadsModerationTests(AuthenticatedUserTes...
8,713
Python
.py
179
39.916201
88
0.683757
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,137
test_validators.py
rafalp_Misago/misago/threads/tests/test_validators.py
from unittest.mock import Mock from django.core.exceptions import ValidationError from django.test import TestCase from ..validators import validate_post_length, validate_thread_title class ValidatePostLengthTests(TestCase): def test_valid_post_length_passes_validation(self): """valid post passes valida...
2,758
Python
.py
51
45.803922
88
0.691679
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,138
test_floodprotection.py
rafalp_Misago/misago/threads/tests/test_floodprotection.py
from unittest.mock import patch from django.urls import reverse from .. import test from ...acl.test import patch_user_acl from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase class FloodProtectionTests(AuthenticatedUserTestCase): def setUp(self): super().setUp()...
1,903
Python
.py
46
33.543478
85
0.657282
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,139
test_thread_postpatch_api.py
rafalp_Misago/misago/threads/tests/test_thread_postpatch_api.py
import json from datetime import timedelta from django.urls import reverse from django.utils import timezone from .. import test from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase from ..models import Post from ..test import patch_category_acl class ThreadPostPatchApiTestC...
36,287
Python
.py
827
34.631197
87
0.60786
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,140
test_validate_post.py
rafalp_Misago/misago/threads/tests/test_validate_post.py
from django.core.exceptions import ValidationError from django.urls import reverse from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase class ValidatePostTests(AuthenticatedUserTestCase): def setUp(self): super().setUp() self.category = Category.objects.g...
3,427
Python
.py
88
28.363636
87
0.564079
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,141
test_watch_replied_thread.py
rafalp_Misago/misago/threads/tests/test_watch_replied_thread.py
from django.urls import reverse from ...notifications.models import WatchedThread from ...notifications.threads import ThreadNotifications from ..models import ThreadParticipant def test_replied_thread_is_watched_by_user_with_option_enabled( notify_on_new_thread_reply_mock, user, user_client, thread ): user....
2,631
Python
.py
74
28.864865
80
0.672319
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,142
test_floodprotection_middleware.py
rafalp_Misago/misago/threads/tests/test_floodprotection_middleware.py
from datetime import timedelta import pytest from django.utils import timezone from ...conf.test import override_dynamic_settings from ..api.postingendpoint import PostingEndpoint, PostingInterrupt from ..api.postingendpoint.floodprotection import FloodProtectionMiddleware from ..test import post_thread default_acl ...
5,832
Python
.py
160
30.49375
88
0.716545
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,143
test_private_thread_replies_view.py
rafalp_Misago/misago/threads/tests/test_private_thread_replies_view.py
from django.urls import reverse from ...test import assert_contains, assert_not_contains from ..models import ThreadParticipant def test_private_thread_replies_view_shows_error_on_missing_permission( user, user_client, user_private_thread ): user.group.can_use_private_threads = False user.group.save() ...
6,387
Python
.py
186
26.419355
89
0.626012
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,144
test_privatethreads_api.py
rafalp_Misago/misago/threads/tests/test_privatethreads_api.py
from django.urls import reverse from .. import test from ...acl.test import patch_user_acl from ..models import Thread, ThreadParticipant from ..test import patch_private_threads_acl from .test_privatethreads import PrivateThreadsTestCase class PrivateThreadsListApiTests(PrivateThreadsTestCase): def setUp(self):...
8,305
Python
.py
175
38.131429
87
0.641929
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,145
test_threads_lists_subcategories.py
rafalp_Misago/misago/threads/tests/test_threads_lists_subcategories.py
from django.urls import reverse from ...categories.enums import CategoryChildrenComponent from ...categories.models import Category from ...conf.test import override_dynamic_settings from ...permissions.enums import CategoryPermission from ...test import assert_contains, assert_not_contains from ...testutils import gr...
3,226
Python
.py
71
40.830986
87
0.774801
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,146
test_attachments_api.py
rafalp_Misago/misago/threads/tests/test_attachments_api.py
import os from django.urls import reverse from PIL import Image from ...acl.models import Role from ...acl.test import patch_user_acl from ...conf import settings from ...users.test import AuthenticatedUserTestCase from ..models import Attachment, AttachmentType TESTFILES_DIR = os.path.join(os.path.dirname(os.path.a...
12,624
Python
.py
244
41.885246
88
0.653378
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,147
test_threads_merge_api.py
rafalp_Misago/misago/threads/tests/test_threads_merge_api.py
import json from unittest.mock import patch import pytest from django.urls import reverse from .. import test from ...acl import useracl from ...acl.objectacl import add_acl_to_obj from ...categories.models import Category from ...conf.dynamicsettings import DynamicSettings from ...conf.test import override_dynamic_s...
43,041
Python
.py
1,066
28.56379
87
0.558626
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,148
test_threadparticipant_model.py
rafalp_Misago/misago/threads/tests/test_threadparticipant_model.py
from django.test import TestCase from django.utils import timezone from ...categories.models import Category from ...users.test import create_test_user from ..models import Post, Thread, ThreadParticipant class ThreadParticipantTests(TestCase): def setUp(self): datetime = timezone.now() self.cat...
3,355
Python
.py
70
38.414286
86
0.662175
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,149
test_thread_polldelete_api.py
rafalp_Misago/misago/threads/tests/test_thread_polldelete_api.py
from datetime import timedelta from django.urls import reverse from django.utils import timezone from ...acl.test import patch_user_acl from ..models import Poll, PollVote, Thread from ..test import patch_category_acl from .test_thread_poll_api import ThreadPollApiTestCase class ThreadPollDeleteTests(ThreadPollApiT...
7,141
Python
.py
153
38.183007
88
0.644317
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,150
test_private_thread_replies_mark_read.py
rafalp_Misago/misago/threads/tests/test_private_thread_replies_mark_read.py
from django.urls import reverse from ...conf.test import override_dynamic_settings from ...notifications.users import notify_user from ...readtracker.models import ReadCategory, ReadThread from ...test import assert_contains from ..test import reply_thread def test_private_thread_replies_view_marks_category_as_read_...
6,422
Python
.py
172
31.162791
97
0.696521
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,151
test_thread_postsplit_api.py
rafalp_Misago/misago/threads/tests/test_thread_postsplit_api.py
import json from django.urls import reverse from .. import test from ...categories.models import Category from ...conf.test import override_dynamic_settings from ...users.test import AuthenticatedUserTestCase from ..models import Post from ..test import patch_category_acl, patch_other_category_acl class ThreadPostS...
24,920
Python
.py
646
27.037152
88
0.545913
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,152
test_thread_replies_mark_read.py
rafalp_Misago/misago/threads/tests/test_thread_replies_mark_read.py
from django.urls import reverse from ...conf.test import override_dynamic_settings from ...notifications.users import notify_user from ...readtracker.models import ReadCategory, ReadThread from ...test import assert_contains from ..test import reply_thread def test_thread_replies_view_doesnt_mark_unread_threads_for_...
3,823
Python
.py
109
29.477064
82
0.696065
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,153
test_privatethread_patch_api.py
rafalp_Misago/misago/threads/tests/test_privatethread_patch_api.py
import json from unittest.mock import patch from .. import test from ...acl.test import patch_user_acl from ...users.test import create_test_user from ..models import Thread, ThreadParticipant from ..test import other_user_cant_use_private_threads from .test_privatethreads import PrivateThreadsTestCase class Private...
27,928
Python
.py
598
36.755853
88
0.626104
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,154
test_thread_polledit_api.py
rafalp_Misago/misago/threads/tests/test_thread_polledit_api.py
from datetime import timedelta from django.urls import reverse from django.utils import timezone from ...acl.test import patch_user_acl from ..serializers.poll import MAX_POLL_OPTIONS from ..test import patch_category_acl from .test_thread_poll_api import ThreadPollApiTestCase class ThreadPollEditTests(ThreadPollAp...
18,243
Python
.py
427
31.400468
88
0.560498
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,155
test_thread_postbulkdelete_api.py
rafalp_Misago/misago/threads/tests/test_thread_postbulkdelete_api.py
import json from datetime import timedelta from django.urls import reverse from django.utils import timezone from .. import test from ..models import Post, Thread from ..test import patch_category_acl from .test_threads_api import ThreadsApiTestCase class PostBulkDeleteApiTests(ThreadsApiTestCase): def setUp(se...
10,795
Python
.py
239
36.317992
88
0.620814
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,156
test_threads_bulkdelete_api.py
rafalp_Misago/misago/threads/tests/test_threads_bulkdelete_api.py
import json from django.urls import reverse from .. import test from ...categories import PRIVATE_THREADS_ROOT_NAME from ...categories.models import Category from ...conf.test import override_dynamic_settings from ..models import Thread from ..test import patch_category_acl from ..threadtypes import trees_map from .t...
6,844
Python
.py
156
34.24359
88
0.61076
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,157
test_threads_lists_flags.py
rafalp_Misago/misago/threads/tests/test_threads_lists_flags.py
from django.urls import reverse from ...conf.test import override_dynamic_settings from ...test import assert_contains, assert_not_contains from ..test import post_thread @override_dynamic_settings(index_view="categories") def test_site_threads_list_shows_thread_globally_pinned_flag(default_category, client): th...
7,984
Python
.py
162
45.024691
87
0.765637
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,158
test_thread_editreply_api.py
rafalp_Misago/misago/threads/tests/test_thread_editreply_api.py
from datetime import timedelta from django.test.client import BOUNDARY, MULTIPART_CONTENT, encode_multipart from django.urls import reverse from django.utils import timezone from .. import test from ...acl.test import patch_user_acl from ...categories.models import Category from ...users.test import AuthenticatedUser...
17,604
Python
.py
367
39.117166
85
0.641865
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,159
test_watch_started_thread.py
rafalp_Misago/misago/threads/tests/test_watch_started_thread.py
from django.urls import reverse from ...notifications.models import WatchedThread from ...notifications.threads import ThreadNotifications def test_started_thread_is_watched_by_user_with_option_enabled( user, user_client, default_category ): user.watch_started_threads = ThreadNotifications.SITE_ONLY user...
2,571
Python
.py
79
25.607595
76
0.645488
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,160
test_thread_poll_api.py
rafalp_Misago/misago/threads/tests/test_thread_poll_api.py
import json from django.urls import reverse from .. import test from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase class ThreadPollApiTestCase(AuthenticatedUserTestCase): def setUp(self): super().setUp() self.category = Category.objects.get(slug="first...
1,095
Python
.py
27
32.814815
79
0.646503
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,161
test_threads_lists_start_thread.py
rafalp_Misago/misago/threads/tests/test_threads_lists_start_thread.py
from django.urls import reverse from ...conf.test import override_dynamic_settings from ...permissions.enums import CategoryPermission from ...permissions.models import CategoryGroupPermission from ...test import assert_contains, assert_not_contains @override_dynamic_settings(index_view="categories") def test_thread...
4,918
Python
.py
121
34.975207
93
0.720193
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,162
test_thread_merge_api.py
rafalp_Misago/misago/threads/tests/test_thread_merge_api.py
from unittest.mock import patch import pytest from django.urls import reverse from ...notifications.models import Notification from .. import test from ...categories.models import Category from ..models import Poll, PollVote, Thread from ..test import patch_category_acl, patch_other_category_acl from .test_threads_ap...
37,105
Python
.py
828
34.97343
88
0.625367
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,163
test_threads_api.py
rafalp_Misago/misago/threads/tests/test_threads_api.py
from datetime import timedelta from django.utils import timezone from .. import test from ...categories import THREADS_ROOT_NAME from ...categories.models import Category from ...users.test import AuthenticatedUserTestCase from ..models import Thread from ..test import patch_category_acl from ..threadtypes import tre...
9,975
Python
.py
204
39.132353
87
0.643893
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,164
rebuildpostssearch.py
rafalp_Misago/misago/threads/management/commands/rebuildpostssearch.py
import time from django.core.management.base import BaseCommand from ....core.management.progressbar import show_progress from ...models import Post class Command(BaseCommand): help = "Rebuilds posts search" def handle(self, *args, **options): posts_to_reindex = Post.objects.filter(is_event=False)....
1,398
Python
.py
29
38.793103
83
0.6507
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,165
clearattachments.py
rafalp_Misago/misago/threads/management/commands/clearattachments.py
import time from datetime import timedelta from django.core.management.base import BaseCommand from django.utils import timezone from ....conf.shortcuts import get_dynamic_settings from ....core.management.progressbar import show_progress from ...models import Attachment class Command(BaseCommand): help = "Dele...
1,409
Python
.py
28
42.857143
87
0.706871
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,166
updatepostschecksums.py
rafalp_Misago/misago/threads/management/commands/updatepostschecksums.py
import time from django.core.management.base import BaseCommand from ....core.management.progressbar import show_progress from ...checksums import update_post_checksum from ...models import Post class Command(BaseCommand): help = "Updates posts checksums" def handle(self, *args, **options): posts_t...
1,176
Python
.py
25
39.04
79
0.675439
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,167
synchronizethreads.py
rafalp_Misago/misago/threads/management/commands/synchronizethreads.py
import time from django.core.management.base import BaseCommand from ....core.management.progressbar import show_progress from ...models import Thread class Command(BaseCommand): help = "Synchronizes threads" def handle(self, *args, **options): threads_to_sync = Thread.objects.count() if n...
1,032
Python
.py
23
36.608696
80
0.670341
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,168
__init__.py
rafalp_Misago/misago/threads/admin/__init__.py
from django.urls import path from django.utils.translation import pgettext_lazy from .views.attachments import AttachmentsList, DeleteAttachment from .views.attachmenttypes import ( AttachmentTypesList, DeleteAttachmentType, EditAttachmentType, NewAttachmentType, ) class MisagoAdminExtension: def...
1,806
Python
.py
44
31.545455
84
0.619021
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,169
forms.py
rafalp_Misago/misago/threads/admin/forms.py
from django import forms from django.utils.translation import pgettext, pgettext_lazy from ..models import AttachmentType def get_searchable_filetypes(): choices = [(0, pgettext_lazy("admin attachments type filter choice", "All types"))] choices += [(a.id, a.name) for a in AttachmentType.objects.order_by("na...
5,793
Python
.py
137
30.547445
274
0.573605
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,170
attachmenttypes.py
rafalp_Misago/misago/threads/admin/views/attachmenttypes.py
from django.contrib import messages from django.db.models import Count from django.utils.translation import pgettext, pgettext_lazy from ....admin.views import generic from ...models import AttachmentType from ..forms import AttachmentTypeForm class AttachmentTypeAdmin(generic.AdminBaseMixin): root_link = "misag...
2,122
Python
.py
48
37.3125
95
0.69694
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,171
attachments.py
rafalp_Misago/misago/threads/admin/views/attachments.py
from django.contrib import messages from django.db import transaction from django.utils.translation import pgettext, pgettext_lazy from ....admin.views import generic from ...models import Attachment, Post from ..forms import FilterAttachmentsForm class AttachmentAdmin(generic.AdminBaseMixin): root_link = "misag...
3,895
Python
.py
86
36.209302
87
0.64591
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,172
test_attachments_views.py
rafalp_Misago/misago/threads/admin/tests/test_attachments_views.py
from django.urls import reverse from ... import test from ....admin.test import AdminTestCase from ....categories.models import Category from ...models import Attachment, AttachmentType class AttachmentAdminViewsTests(AdminTestCase): def setUp(self): super().setUp() self.category = Category.obje...
4,680
Python
.py
103
35.184466
85
0.629833
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,173
test_attachment_types_views.py
rafalp_Misago/misago/threads/admin/tests/test_attachment_types_views.py
from django.urls import reverse from ....acl.models import Role from ....admin.test import AdminTestCase from ...models import AttachmentType class AttachmentTypeAdminViewsTests(AdminTestCase): def setUp(self): super().setUp() self.admin_link = reverse("misago:admin:settings:attachment-types:inde...
7,950
Python
.py
181
32.342541
88
0.582406
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,174
post.py
rafalp_Misago/misago/threads/viewmodels/post.py
from django.shortcuts import get_object_or_404 from ...acl.objectacl import add_acl_to_obj from ...core.viewmodel import ViewModel as BaseViewModel from ..permissions import exclude_invisible_posts __all__ = ["ThreadPost"] class ViewModel(BaseViewModel): def __init__(self, request, thread, pk): model = ...
1,092
Python
.py
28
31.5
75
0.659048
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,175
category.py
rafalp_Misago/misago/threads/viewmodels/category.py
from django.http import Http404 from ...acl.objectacl import add_acl_to_obj from ...categories.models import Category from ...categories.permissions import allow_browse_category, allow_see_category from ...categories.serializers import CategorySerializer from ...core.shortcuts import validate_slug from ...core.viewmod...
3,736
Python
.py
100
28.87
83
0.634877
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,176
thread.py
rafalp_Misago/misago/threads/viewmodels/thread.py
from django.shortcuts import get_object_or_404 from django.utils.translation import pgettext from ...acl.objectacl import add_acl_to_obj from ...categories import PRIVATE_THREADS_ROOT_NAME, THREADS_ROOT_NAME from ...categories.models import Category from ...core.shortcuts import validate_slug from ...core.viewmodel im...
5,191
Python
.py
141
28.078014
88
0.627318
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,177
__init__.py
rafalp_Misago/misago/threads/viewmodels/__init__.py
from .category import * from .post import * from .posts import * from .thread import * from .threads import *
110
Python
.py
5
21
23
0.761905
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,178
posts.py
rafalp_Misago/misago/threads/viewmodels/posts.py
from ...acl.objectacl import add_acl_to_obj from ...core.shortcuts import paginate, pagination_dict from ...users.online.utils import make_users_status_aware from ..paginator import PostsPaginator from ..permissions import exclude_invisible_posts from ..serializers import PostSerializer from ..utils import add_likes_to...
3,591
Python
.py
91
29.208791
87
0.598446
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,179
threads.py
rafalp_Misago/misago/threads/viewmodels/threads.py
from django.core.exceptions import PermissionDenied from django.core.paginator import EmptyPage, InvalidPage from django.db.models import Q from django.http import Http404 from django.utils.translation import pgettext, pgettext_lazy from ...acl.objectacl import add_acl_to_obj from ...core.cursorpagination import get_p...
9,411
Python
.py
207
36.019324
88
0.642639
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,180
polls.py
rafalp_Misago/misago/threads/permissions/polls.py
from django import forms from django.core.exceptions import PermissionDenied from django.utils import timezone from django.utils.translation import npgettext, pgettext_lazy from ...acl import algebra from ...acl.decorators import return_boolean from ...acl.models import Role from ...admin.forms import YesNoSwitch from...
11,134
Python
.py
289
28.190311
88
0.576221
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,181
bestanswers.py
rafalp_Misago/misago/threads/permissions/bestanswers.py
from django import forms from django.core.exceptions import PermissionDenied from django.utils import timezone from django.utils.translation import npgettext, pgettext_lazy from ...acl import algebra from ...acl.decorators import return_boolean from ...categories.models import Category, CategoryRole from ...categories...
14,484
Python
.py
348
31.227011
131
0.601365
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,182
privatethreads.py
rafalp_Misago/misago/threads/permissions/privatethreads.py
from django import forms from django.core.exceptions import PermissionDenied from django.http import Http404 from django.utils.translation import pgettext_lazy from ...acl import algebra from ...acl.decorators import return_boolean from ...acl.models import Role from ...admin.forms import YesNoSwitch from ...categorie...
11,381
Python
.py
296
29.527027
117
0.623184
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,183
__init__.py
rafalp_Misago/misago/threads/permissions/__init__.py
from .bestanswers import * from .privatethreads import * from .threads import * from .polls import *
101
Python
.py
4
24.25
29
0.793814
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,184
threads.py
rafalp_Misago/misago/threads/permissions/threads.py
from django import forms from django.core.exceptions import PermissionDenied from django.db.models import Q from django.http import Http404 from django.utils import timezone from django.utils.translation import npgettext, pgettext_lazy from ...acl import algebra from ...acl.decorators import return_boolean from ...acl...
64,478
Python
.py
1,665
27.864865
302
0.57285
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,185
attachments.py
rafalp_Misago/misago/threads/permissions/attachments.py
from django import forms from django.utils.translation import pgettext_lazy from ...acl import algebra from ...acl.models import Role from ...admin.forms import YesNoSwitch from ..models import Attachment # Admin Permissions Forms class PermissionsForm(forms.Form): legend = pgettext_lazy("attachments permission"...
2,427
Python
.py
62
32.451613
88
0.690375
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,186
get_private_thread_replies_page_context_data.py
rafalp_Misago/misago/threads/hooks/get_private_thread_replies_page_context_data.py
from typing import Protocol from django.http import HttpRequest from ...plugins.hooks import FilterHook from ..models import Thread class GetPrivateThreadRepliesPageContextDataHookAction(Protocol): """ A standard Misago function used to get the template context data for the private thread replies page. ...
3,102
Python
.py
90
28.377778
86
0.685185
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,187
get_thread_url.py
rafalp_Misago/misago/threads/hooks/get_thread_url.py
from typing import Protocol from django.db.models import QuerySet from django.http import HttpRequest from ...categories.models import Category from ...plugins.hooks import FilterHook from ..models import Thread class GetThreadUrlHookAction(Protocol): """ A standard Misago function used to retrieve a thread...
2,850
Python
.py
81
29.185185
88
0.674597
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,188
get_private_thread_replies_page_thread_queryset.py
rafalp_Misago/misago/threads/hooks/get_private_thread_replies_page_thread_queryset.py
from typing import Protocol from django.db.models import QuerySet from django.http import HttpRequest from ...plugins.hooks import FilterHook class GetPrivateThreadRepliesPageThreadQuerysetHookAction(Protocol): """ A standard Misago function used to get a queryset used to get a thread for the private th...
2,492
Python
.py
64
33.375
89
0.732471
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,189
get_thread_replies_page_posts_queryset.py
rafalp_Misago/misago/threads/hooks/get_thread_replies_page_posts_queryset.py
from typing import Protocol from django.db.models import QuerySet from django.http import HttpRequest from ...plugins.hooks import FilterHook from ..models import Thread class GetThreadRepliesPagePostsQuerysetHookAction(Protocol): """ A standard Misago function used to get a queryset used to get posts displ...
2,824
Python
.py
74
32.472973
85
0.722652
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,190
get_threads_page_moderation_actions.py
rafalp_Misago/misago/threads/hooks/get_threads_page_moderation_actions.py
from typing import Protocol, Type from django.http import HttpRequest from ...moderation.threads import ThreadsBulkModerationAction from ...plugins.hooks import FilterHook class GetThreadsPageModerationActionsHookAction(Protocol): """ A standard Misago function used to get available moderation actions for ...
3,032
Python
.py
77
33.142857
87
0.725342
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,191
get_threads_page_context_data.py
rafalp_Misago/misago/threads/hooks/get_threads_page_context_data.py
from typing import Protocol from django.http import HttpRequest from ...plugins.hooks import FilterHook class GetThreadsPageContextDataHookAction(Protocol): """ A standard Misago function used to get the template context data for the threads page. # Arguments ## `request: HttpRequest` The...
2,453
Python
.py
68
30.161765
83
0.696634
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,192
get_thread_posts_feed_users.py
rafalp_Misago/misago/threads/hooks/get_thread_posts_feed_users.py
from typing import TYPE_CHECKING, Protocol from django.http import HttpRequest from ...plugins.hooks import FilterHook if TYPE_CHECKING: from ...users.models import User class GetThreadPostsFeedUsersHookAction(Protocol): """ A standard Misago function used to get a `dict` of `User` instances used t...
3,038
Python
.py
79
32.278481
83
0.683345
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,193
get_category_threads_page_queryset.py
rafalp_Misago/misago/threads/hooks/get_category_threads_page_queryset.py
from typing import Protocol from django.http import HttpRequest from django.db.models import QuerySet from ...plugins.hooks import FilterHook class GetCategoryThreadsPageQuerysetHookAction(Protocol): """ A standard Misago function used to get the base threads queryset for the category threads page. ...
2,334
Python
.py
63
31.412698
79
0.724431
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,194
get_category_threads_page_threads.py
rafalp_Misago/misago/threads/hooks/get_category_threads_page_threads.py
from typing import Protocol from django.http import HttpRequest from ...categories.models import Category from ...plugins.hooks import FilterHook class GetCategoryThreadsPageThreadsHookAction(Protocol): """ A standard Misago function used to get the complete threads data for the category threads page. R...
3,040
Python
.py
85
29.729412
81
0.69777
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,195
get_threads_users.py
rafalp_Misago/misago/threads/hooks/get_threads_users.py
from typing import TYPE_CHECKING, Protocol from django.http import HttpRequest from ...plugins.hooks import FilterHook from ..models import Thread if TYPE_CHECKING: from ...users.models import User class GetThreadsUsersHookAction(Protocol): """ A standard Misago function used to get `User` objects to d...
2,484
Python
.py
68
30.779412
85
0.687842
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,196
get_category_threads_page_filters.py
rafalp_Misago/misago/threads/hooks/get_category_threads_page_filters.py
from typing import Protocol from django.http import HttpRequest from ...categories.models import Category from ...plugins.hooks import FilterHook from ..filters import ThreadsFilter class GetCategoryThreadsPageFiltersHookAction(Protocol): """ A standard Misago function used to get available filters for ...
3,045
Python
.py
85
29.505882
81
0.70274
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,197
get_thread_replies_page_context_data.py
rafalp_Misago/misago/threads/hooks/get_thread_replies_page_context_data.py
from typing import Protocol from django.http import HttpRequest from ...plugins.hooks import FilterHook from ..models import Thread class GetThreadRepliesPageContextDataHookAction(Protocol): """ A standard Misago function used to get the template context data for the thread replies page. # Argument...
2,959
Python
.py
86
28.22093
81
0.676793
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,198
get_threads_page_subcategories.py
rafalp_Misago/misago/threads/hooks/get_threads_page_subcategories.py
from typing import Protocol from django.http import HttpRequest from ...plugins.hooks import FilterHook class GetThreadsPageSubcategoriesHookAction(Protocol): """ A standard Misago function used to build a `dict` with data for the categories list component, used to display the list of subcategories on ...
3,066
Python
.py
82
31.536585
86
0.702648
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)
18,199
get_threads_page_filters.py
rafalp_Misago/misago/threads/hooks/get_threads_page_filters.py
from typing import Protocol from django.http import HttpRequest from ...plugins.hooks import FilterHook from ..filters import ThreadsFilter class GetThreadsPageFiltersHookAction(Protocol): """ A standard Misago function used to get available filters for the threads list. # Arguments ## `request: H...
2,525
Python
.py
66
32.045455
83
0.7078
rafalp/Misago
2,519
524
136
GPL-2.0
9/5/2024, 5:12:22 PM (Europe/Amsterdam)