aa-bulletin-board 2.3.1__py3-none-any.whl → 2.3.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aa_bulletin_board/__init__.py +1 -1
- aa_bulletin_board/app_settings.py +20 -0
- aa_bulletin_board/auth_hooks.py +5 -4
- aa_bulletin_board/forms.py +8 -3
- aa_bulletin_board/helper/static_files.py +3 -5
- aa_bulletin_board/helper/string.py +22 -0
- aa_bulletin_board/locale/cs_CZ/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/de/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/django.pot +13 -13
- aa_bulletin_board/locale/es/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/fr_FR/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/it_IT/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/ja/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/ko_KR/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/nl_NL/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/pl_PL/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/ru/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/sk/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/locale/uk/LC_MESSAGES/django.mo +0 -0
- aa_bulletin_board/locale/uk/LC_MESSAGES/django.po +21 -41
- aa_bulletin_board/locale/zh_Hans/LC_MESSAGES/django.po +12 -12
- aa_bulletin_board/models.py +7 -11
- aa_bulletin_board/templates/aa_bulletin_board/bulletin.html +1 -1
- aa_bulletin_board/templates/aa_bulletin_board/edit-bulletin.html +2 -2
- aa_bulletin_board/templatetags/aa_bulletin_board.py +2 -2
- aa_bulletin_board/tests/test_bulletins.py +1 -1
- aa_bulletin_board/tests/test_forms.py +181 -0
- aa_bulletin_board/tests/test_settings.py +37 -0
- aa_bulletin_board/tests/test_templatetags.py +4 -3
- aa_bulletin_board/tests/test_user_interface.py +1 -1
- {aa_bulletin_board-2.3.1.dist-info → aa_bulletin_board-2.3.3.dist-info}/METADATA +1 -1
- {aa_bulletin_board-2.3.1.dist-info → aa_bulletin_board-2.3.3.dist-info}/RECORD +34 -32
- aa_bulletin_board/helpers.py +0 -34
- aa_bulletin_board/templates/aa_bulletin_board/partials/header/page-header.html +0 -9
- {aa_bulletin_board-2.3.1.dist-info → aa_bulletin_board-2.3.3.dist-info}/WHEEL +0 -0
- {aa_bulletin_board-2.3.1.dist-info → aa_bulletin_board-2.3.3.dist-info}/licenses/LICENSE +0 -0
@@ -6,7 +6,6 @@ Versioned static URLs to break browser caches when changing the app version
|
|
6
6
|
import os
|
7
7
|
|
8
8
|
# Django
|
9
|
-
from django.conf import settings
|
10
9
|
from django.template.defaulttags import register
|
11
10
|
from django.templatetags.static import static
|
12
11
|
from django.utils.safestring import mark_safe
|
@@ -19,6 +18,7 @@ from app_utils.logging import LoggerAddTag
|
|
19
18
|
|
20
19
|
# AA Bulletin Board
|
21
20
|
from aa_bulletin_board import __title__, __version__
|
21
|
+
from aa_bulletin_board.app_settings import debug_enabled
|
22
22
|
from aa_bulletin_board.constants import PACKAGE_NAME
|
23
23
|
from aa_bulletin_board.helper.static_files import calculate_integrity_hash
|
24
24
|
|
@@ -56,7 +56,7 @@ def aa_bulletin_board_static(
|
|
56
56
|
# Integrity hash calculation only for non-debug mode
|
57
57
|
sri_string = (
|
58
58
|
f' integrity="{calculate_integrity_hash(relative_file_path)}" crossorigin="anonymous"'
|
59
|
-
if not
|
59
|
+
if not debug_enabled()
|
60
60
|
else ""
|
61
61
|
)
|
62
62
|
|
@@ -13,7 +13,7 @@ from django.urls import reverse
|
|
13
13
|
|
14
14
|
# AA Bulletin Board
|
15
15
|
from aa_bulletin_board.forms import BulletinForm
|
16
|
-
from aa_bulletin_board.
|
16
|
+
from aa_bulletin_board.helper.string import string_cleanup
|
17
17
|
from aa_bulletin_board.models import Bulletin, get_sentinel_user
|
18
18
|
from aa_bulletin_board.tests.utils import create_fake_user
|
19
19
|
|
@@ -0,0 +1,181 @@
|
|
1
|
+
"""
|
2
|
+
Test for aa_bulletin_board.forms
|
3
|
+
"""
|
4
|
+
|
5
|
+
# Django
|
6
|
+
from django.contrib.auth.models import Group
|
7
|
+
from django.test import TestCase
|
8
|
+
|
9
|
+
# AA Bulletin Board
|
10
|
+
from aa_bulletin_board.forms import (
|
11
|
+
BulletinForm,
|
12
|
+
SpecialModelChoiceIterator,
|
13
|
+
SpecialModelMultipleChoiceField,
|
14
|
+
)
|
15
|
+
|
16
|
+
|
17
|
+
class TestSpecialModelChoiceIterator(TestCase):
|
18
|
+
"""
|
19
|
+
Tests for SpecialModelChoiceIterator
|
20
|
+
"""
|
21
|
+
|
22
|
+
def test_iterates_over_queryset(self):
|
23
|
+
"""
|
24
|
+
Test iterates over the queryset without re-fetching it
|
25
|
+
|
26
|
+
:return:
|
27
|
+
:rtype:
|
28
|
+
"""
|
29
|
+
|
30
|
+
group1 = Group.objects.create(name="Group 1")
|
31
|
+
group2 = Group.objects.create(name="Group 2")
|
32
|
+
|
33
|
+
field = SpecialModelMultipleChoiceField(queryset=Group.objects.all())
|
34
|
+
iterator = SpecialModelChoiceIterator(field)
|
35
|
+
|
36
|
+
choices = list(iterator)
|
37
|
+
|
38
|
+
self.assertIn((group1.pk, str(group1)), choices)
|
39
|
+
self.assertIn((group2.pk, str(group2)), choices)
|
40
|
+
|
41
|
+
def test_includes_empty_label_if_set(self):
|
42
|
+
"""
|
43
|
+
Test includes empty label if a label is set
|
44
|
+
|
45
|
+
:return:
|
46
|
+
:rtype:
|
47
|
+
"""
|
48
|
+
|
49
|
+
field = SpecialModelMultipleChoiceField(queryset=Group.objects.all())
|
50
|
+
field.empty_label = "Select a group"
|
51
|
+
iterator = SpecialModelChoiceIterator(field)
|
52
|
+
|
53
|
+
choices = list(iterator)
|
54
|
+
|
55
|
+
self.assertIn(("", "Select a group"), choices)
|
56
|
+
|
57
|
+
|
58
|
+
class TestSpecialModelMultipleChoiceField(TestCase):
|
59
|
+
"""
|
60
|
+
Tests for SpecialModelMultipleChoiceField
|
61
|
+
"""
|
62
|
+
|
63
|
+
def test_sets_and_gets_queryset(self):
|
64
|
+
"""
|
65
|
+
Test sets and gets the queryset without re-fetching it
|
66
|
+
|
67
|
+
:return:
|
68
|
+
:rtype:
|
69
|
+
"""
|
70
|
+
|
71
|
+
field = SpecialModelMultipleChoiceField(queryset=Group.objects.none())
|
72
|
+
group1 = Group.objects.create(name="Group 1")
|
73
|
+
group2 = Group.objects.create(name="Group 2")
|
74
|
+
field.queryset = Group.objects.all()
|
75
|
+
|
76
|
+
self.assertEqual(list(field.queryset), [group1, group2])
|
77
|
+
|
78
|
+
def test_updates_widget_choices_when_queryset_is_set(self):
|
79
|
+
"""
|
80
|
+
Test updates the widget choices when the queryset is set
|
81
|
+
|
82
|
+
:return:
|
83
|
+
:rtype:
|
84
|
+
"""
|
85
|
+
|
86
|
+
field = SpecialModelMultipleChoiceField(queryset=Group.objects.none())
|
87
|
+
group1 = Group.objects.create(name="Group 1")
|
88
|
+
group2 = Group.objects.create(name="Group 2")
|
89
|
+
field.queryset = Group.objects.all()
|
90
|
+
|
91
|
+
self.assertIn((group1.pk, str(group1)), field.widget.choices)
|
92
|
+
self.assertIn((group2.pk, str(group2)), field.widget.choices)
|
93
|
+
|
94
|
+
def test_handles_empty_queryset(self):
|
95
|
+
"""
|
96
|
+
Test handles empty queryset
|
97
|
+
|
98
|
+
:return:
|
99
|
+
:rtype:
|
100
|
+
"""
|
101
|
+
|
102
|
+
field = SpecialModelMultipleChoiceField(queryset=Group.objects.none())
|
103
|
+
|
104
|
+
self.assertEqual(list(field.queryset), [])
|
105
|
+
self.assertEqual(list(field.widget.choices), [])
|
106
|
+
|
107
|
+
|
108
|
+
class TestBulletinForm(TestCase):
|
109
|
+
"""
|
110
|
+
Tests for BulletinForm
|
111
|
+
"""
|
112
|
+
|
113
|
+
def test_valid_form_with_groups_queryset(self):
|
114
|
+
"""
|
115
|
+
Test valid form with groups queryset
|
116
|
+
|
117
|
+
:return:
|
118
|
+
:rtype:
|
119
|
+
"""
|
120
|
+
|
121
|
+
group1 = Group.objects.create(name="Group 1")
|
122
|
+
group2 = Group.objects.create(name="Group 2")
|
123
|
+
form_data = {
|
124
|
+
"title": "Test Bulletin",
|
125
|
+
"content": "This is a test bulletin.",
|
126
|
+
"groups": [group1.pk, group2.pk],
|
127
|
+
}
|
128
|
+
form = BulletinForm(data=form_data, groups_queryset=Group.objects.all())
|
129
|
+
|
130
|
+
self.assertTrue(form.is_valid())
|
131
|
+
|
132
|
+
def test_invalid_form_without_title(self):
|
133
|
+
"""
|
134
|
+
Test invalid form without title
|
135
|
+
|
136
|
+
:return:
|
137
|
+
:rtype:
|
138
|
+
"""
|
139
|
+
|
140
|
+
form_data = {
|
141
|
+
"title": "",
|
142
|
+
"content": "This is a test bulletin.",
|
143
|
+
}
|
144
|
+
form = BulletinForm(data=form_data)
|
145
|
+
|
146
|
+
self.assertFalse(form.is_valid())
|
147
|
+
self.assertIn("title", form.errors)
|
148
|
+
|
149
|
+
def test_clean_raises_validation_error_for_empty_content(self):
|
150
|
+
"""
|
151
|
+
Test clean raises validation error for empty content
|
152
|
+
|
153
|
+
:return:
|
154
|
+
:rtype:
|
155
|
+
"""
|
156
|
+
|
157
|
+
form_data = {
|
158
|
+
"title": "Test Bulletin",
|
159
|
+
"content": " ",
|
160
|
+
}
|
161
|
+
form = BulletinForm(data=form_data)
|
162
|
+
|
163
|
+
self.assertFalse(form.is_valid())
|
164
|
+
self.assertIn("content", form.errors)
|
165
|
+
|
166
|
+
def test_clean_content_strips_unwanted_characters(self):
|
167
|
+
"""
|
168
|
+
Test clean content strips unwanted characters
|
169
|
+
|
170
|
+
:return:
|
171
|
+
:rtype:
|
172
|
+
"""
|
173
|
+
|
174
|
+
form_data = {
|
175
|
+
"title": "Test Bulletin",
|
176
|
+
"content": " <p>Test content</p> ",
|
177
|
+
}
|
178
|
+
form = BulletinForm(data=form_data)
|
179
|
+
form.is_valid()
|
180
|
+
|
181
|
+
self.assertEqual(form.cleaned_data["content"], "<p>Test content</p>")
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"""
|
2
|
+
Test the settings
|
3
|
+
"""
|
4
|
+
|
5
|
+
# Django
|
6
|
+
from django.test import TestCase, override_settings
|
7
|
+
|
8
|
+
# AA Bulletin Board
|
9
|
+
from aa_bulletin_board.app_settings import debug_enabled
|
10
|
+
|
11
|
+
|
12
|
+
class TestSettings(TestCase):
|
13
|
+
"""
|
14
|
+
Test the settings
|
15
|
+
"""
|
16
|
+
|
17
|
+
@override_settings(DEBUG=True)
|
18
|
+
def test_debug_enabled_with_debug_true(self) -> None:
|
19
|
+
"""
|
20
|
+
Test debug_enabled with DEBUG = True
|
21
|
+
|
22
|
+
:return:
|
23
|
+
:rtype:
|
24
|
+
"""
|
25
|
+
|
26
|
+
self.assertTrue(debug_enabled())
|
27
|
+
|
28
|
+
@override_settings(DEBUG=False)
|
29
|
+
def test_debug_enabled_with_debug_false(self) -> None:
|
30
|
+
"""
|
31
|
+
Test debug_enabled with DEBUG = False
|
32
|
+
|
33
|
+
:return:
|
34
|
+
:rtype:
|
35
|
+
"""
|
36
|
+
|
37
|
+
self.assertFalse(debug_enabled())
|
@@ -8,6 +8,7 @@ from django.test import TestCase, override_settings
|
|
8
8
|
|
9
9
|
# AA Bulletin Board
|
10
10
|
from aa_bulletin_board import __version__
|
11
|
+
from aa_bulletin_board.constants import PACKAGE_NAME
|
11
12
|
from aa_bulletin_board.helper.static_files import calculate_integrity_hash
|
12
13
|
|
13
14
|
|
@@ -36,11 +37,11 @@ class TestVersionedStatic(TestCase):
|
|
36
37
|
|
37
38
|
rendered_template = template_to_render.render(context=context)
|
38
39
|
|
39
|
-
expected_static_css_src = f'/static/
|
40
|
+
expected_static_css_src = f'/static/{PACKAGE_NAME}/css/aa-bulletin-board.min.css?v={context["version"]}'
|
40
41
|
expected_static_css_src_integrity = calculate_integrity_hash(
|
41
42
|
"css/aa-bulletin-board.min.css"
|
42
43
|
)
|
43
|
-
expected_static_js_src = f'/static/
|
44
|
+
expected_static_js_src = f'/static/{PACKAGE_NAME}/javascript/aa-bulletin-board-oembed.min.js?v={context["version"]}'
|
44
45
|
expected_static_js_src_integrity = calculate_integrity_hash(
|
45
46
|
"javascript/aa-bulletin-board-oembed.min.js"
|
46
47
|
)
|
@@ -73,7 +74,7 @@ class TestVersionedStatic(TestCase):
|
|
73
74
|
|
74
75
|
rendered_template = template_to_render.render(context=context)
|
75
76
|
|
76
|
-
expected_static_css_src = f'/static/
|
77
|
+
expected_static_css_src = f'/static/{PACKAGE_NAME}/css/aa-bulletin-board.min.css?v={context["version"]}'
|
77
78
|
|
78
79
|
self.assertIn(member=expected_static_css_src, container=rendered_template)
|
79
80
|
self.assertNotIn(member="integrity=", container=rendered_template)
|
@@ -11,7 +11,7 @@ from django.contrib.auth.models import Group
|
|
11
11
|
from django.urls import reverse
|
12
12
|
|
13
13
|
# AA Bulletin Board
|
14
|
-
from aa_bulletin_board.
|
14
|
+
from aa_bulletin_board.helper.string import string_cleanup
|
15
15
|
from aa_bulletin_board.models import Bulletin
|
16
16
|
from aa_bulletin_board.tests.utils import create_fake_user
|
17
17
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: aa-bulletin-board
|
3
|
-
Version: 2.3.
|
3
|
+
Version: 2.3.3
|
4
4
|
Summary: A simple bulletin board for Alliance Auth
|
5
5
|
Project-URL: Changelog, https://github.com/ppfeufer/aa-bulletin-board/blob/master/CHANGELOG.md
|
6
6
|
Project-URL: Documentation, https://github.com/ppfeufer/aa-bulletin-board/blob/master/README.md
|
@@ -1,42 +1,43 @@
|
|
1
|
-
aa_bulletin_board/__init__.py,sha256=
|
1
|
+
aa_bulletin_board/__init__.py,sha256=S8hQCh6msOIHvAipXVLju1N_qppoEwubV-_8EQesNkg,133
|
2
|
+
aa_bulletin_board/app_settings.py,sha256=59zkVfW3JHj4kfovIFZYt3kWdXqDmBSF4kaIN0W6m40,244
|
2
3
|
aa_bulletin_board/apps.py,sha256=RzL8kLrLzWMC3Q2VBAI8snXRTehqZ8TKtNozdrZe20A,513
|
3
|
-
aa_bulletin_board/auth_hooks.py,sha256=
|
4
|
+
aa_bulletin_board/auth_hooks.py,sha256=F-5_gP7HI5RzwlF9GqI_pJTyOtq-V-ZhZLSpjpyQSe4,1456
|
4
5
|
aa_bulletin_board/constants.py,sha256=FiSn7zyC39ubomxujNXX05_LHykhDRx0Hk-7Ao4LEtQ,446
|
5
|
-
aa_bulletin_board/forms.py,sha256=
|
6
|
-
aa_bulletin_board/helpers.py,sha256=921-X-4DogXt-MgjkPMy_NpP64c8JRHpylZf_NeN_Ow,772
|
6
|
+
aa_bulletin_board/forms.py,sha256=h5-J7Mr8Xjzi1SaLC4tWz8C7zlP4oXaOphD5-4Z4OL8,3325
|
7
7
|
aa_bulletin_board/managers.py,sha256=BIoUNyLOpJftKs4I05eG2DC6zPGWzCrFhL2nAGUMVos,1066
|
8
|
-
aa_bulletin_board/models.py,sha256=
|
8
|
+
aa_bulletin_board/models.py,sha256=MOWHCaB_XtCguN_Sa3phKQXZAK_irNUTq81Zq-s2V5U,3529
|
9
9
|
aa_bulletin_board/urls.py,sha256=giE7z-t8zpC3mPzPYblMLrkSTn5v7ad4NoJsSk-Jsfg,595
|
10
10
|
aa_bulletin_board/views.py,sha256=Eo5UHFMgbt1fuoh02gUKot58SG4d60XEfQWI1uJhlc8,6531
|
11
11
|
aa_bulletin_board/helper/__init__.py,sha256=Xdjx16QiK1MmVpJ2Je074ddMWzhnyRX7omuxPomMaow,51
|
12
|
-
aa_bulletin_board/helper/static_files.py,sha256=
|
13
|
-
aa_bulletin_board/
|
12
|
+
aa_bulletin_board/helper/static_files.py,sha256=TVl9_3HLZ2umDejA79ahxGtk112nWojY4AUa6Mb30Is,1045
|
13
|
+
aa_bulletin_board/helper/string.py,sha256=TzRyxjHH7EPqCbd2-L_vz5L6CyrfS4SKQxUeEm0u2aQ,427
|
14
|
+
aa_bulletin_board/locale/django.pot,sha256=WsK1he7IH6NyK10agkcrKJcYE_xZBNyRU5jgHrg9XUk,4909
|
14
15
|
aa_bulletin_board/locale/cs_CZ/LC_MESSAGES/django.mo,sha256=ZhKB7486VzGz4lS72jucN0JWc3TPzADIo7UuN2sf5S8,3462
|
15
|
-
aa_bulletin_board/locale/cs_CZ/LC_MESSAGES/django.po,sha256=
|
16
|
+
aa_bulletin_board/locale/cs_CZ/LC_MESSAGES/django.po,sha256=WFHIQxwoFQf3cXwIG8-dQVZ7STwFzPRJ1W2HonQY_rs,6241
|
16
17
|
aa_bulletin_board/locale/de/LC_MESSAGES/django.mo,sha256=m0YvI06FxR60jNRQDoy7_k-Yl1thl2VAoOqKoDeMdNg,3404
|
17
|
-
aa_bulletin_board/locale/de/LC_MESSAGES/django.po,sha256=
|
18
|
+
aa_bulletin_board/locale/de/LC_MESSAGES/django.po,sha256=5VBTcjDXrXQLXOaJrtCD27cC0zpSjJf4IiPdL9AUrSU,6146
|
18
19
|
aa_bulletin_board/locale/es/LC_MESSAGES/django.mo,sha256=kTDcOFWmMZ6EMuAm0MPLdyj4S57f_DhNPvCeEjCh40s,2665
|
19
|
-
aa_bulletin_board/locale/es/LC_MESSAGES/django.po,sha256
|
20
|
+
aa_bulletin_board/locale/es/LC_MESSAGES/django.po,sha256=oPzP6Z97prdsDLdxewtyV1_8x2QAwGlIjI1pS2m6i00,6418
|
20
21
|
aa_bulletin_board/locale/fr_FR/LC_MESSAGES/django.mo,sha256=lCwF9Wa3wq6WqSAkrbBpDddAVEh2txGr_bPId74A3p0,1861
|
21
|
-
aa_bulletin_board/locale/fr_FR/LC_MESSAGES/django.po,sha256=
|
22
|
+
aa_bulletin_board/locale/fr_FR/LC_MESSAGES/django.po,sha256=y9UqC86YRjohm4_4CZP2de_dxMhwhO25phgr6j3IznY,5961
|
22
23
|
aa_bulletin_board/locale/it_IT/LC_MESSAGES/django.mo,sha256=7eI69SSNv6OgS0bso_Mrw3DtapHmJXEyu_mqd7ke0dg,657
|
23
|
-
aa_bulletin_board/locale/it_IT/LC_MESSAGES/django.po,sha256
|
24
|
+
aa_bulletin_board/locale/it_IT/LC_MESSAGES/django.po,sha256=-uTWd2nUModC8bJOjB1o3mnU0hvusMyCkIC3BplWSXY,5080
|
24
25
|
aa_bulletin_board/locale/ja/LC_MESSAGES/django.mo,sha256=W8hWAIEQSTj1iJqMJFLjlp2Roeljr8dluVVSEHBw0bw,1503
|
25
|
-
aa_bulletin_board/locale/ja/LC_MESSAGES/django.po,sha256=
|
26
|
+
aa_bulletin_board/locale/ja/LC_MESSAGES/django.po,sha256=xZcleMOWC5sQnrE-vt8Kvyq3XMkpNVia1D1fmxvT5nI,5430
|
26
27
|
aa_bulletin_board/locale/ko_KR/LC_MESSAGES/django.mo,sha256=mTVxpRnoj-ErNxF0Y5gdbKVqNT0Za4p5DW0tBs2tURw,2569
|
27
|
-
aa_bulletin_board/locale/ko_KR/LC_MESSAGES/django.po,sha256=
|
28
|
+
aa_bulletin_board/locale/ko_KR/LC_MESSAGES/django.po,sha256=mWkEflQMenONUZOh8SzExp0YSGKroG43_44zAfF4CRA,6529
|
28
29
|
aa_bulletin_board/locale/nl_NL/LC_MESSAGES/django.mo,sha256=tomc7fMl3JZoZ_I1hTgDDigFt3RyaiR-3sTD7xYhg98,483
|
29
|
-
aa_bulletin_board/locale/nl_NL/LC_MESSAGES/django.po,sha256=
|
30
|
+
aa_bulletin_board/locale/nl_NL/LC_MESSAGES/django.po,sha256=QgNmfobFCQEbizavhWjx2fhyU5HDsF2VI08f97Y4eEc,4971
|
30
31
|
aa_bulletin_board/locale/pl_PL/LC_MESSAGES/django.mo,sha256=W2q9nAX8EDr7lLDhaJW1WChLwF1v7hy1H71g5n38f18,876
|
31
|
-
aa_bulletin_board/locale/pl_PL/LC_MESSAGES/django.po,sha256=
|
32
|
+
aa_bulletin_board/locale/pl_PL/LC_MESSAGES/django.po,sha256=dUcIvGKb8mQI7XaRPk4hmKjVFSf-LJCvtKPSe315u8I,5188
|
32
33
|
aa_bulletin_board/locale/ru/LC_MESSAGES/django.mo,sha256=ZUmnbwwBgHs5m0RzyMPZvtpVkaV9Rylwg1gQCa9-dcc,4341
|
33
|
-
aa_bulletin_board/locale/ru/LC_MESSAGES/django.po,sha256=
|
34
|
+
aa_bulletin_board/locale/ru/LC_MESSAGES/django.po,sha256=MM5pKfEtBjIuThfTXZS1mRwKkgCz1jDAlzlXZhBnQT0,7233
|
34
35
|
aa_bulletin_board/locale/sk/LC_MESSAGES/django.mo,sha256=qbQEKRh_K6GhMhKVY-xR1tC5YIofxLCprGaDq6bltcM,562
|
35
|
-
aa_bulletin_board/locale/sk/LC_MESSAGES/django.po,sha256=
|
36
|
-
aa_bulletin_board/locale/uk/LC_MESSAGES/django.mo,sha256=
|
37
|
-
aa_bulletin_board/locale/uk/LC_MESSAGES/django.po,sha256=
|
36
|
+
aa_bulletin_board/locale/sk/LC_MESSAGES/django.po,sha256=Xy8AvWsAmUksE8d_vOs0nWE27cFa8HmEQ78VIsNCNWY,5072
|
37
|
+
aa_bulletin_board/locale/uk/LC_MESSAGES/django.mo,sha256=kGH4H4OEFgnt9eKv6Xd9f8y2xPOIHoZV9Y9juRBPJZQ,4515
|
38
|
+
aa_bulletin_board/locale/uk/LC_MESSAGES/django.po,sha256=Ls9k-KZMh0vQARgKWm7nDiUFVtTlDMGJmKUv6dxVQ3A,7390
|
38
39
|
aa_bulletin_board/locale/zh_Hans/LC_MESSAGES/django.mo,sha256=eWtNtT-OkgeZTQwCAZmM82eo_0vAvt_zmnPnNLHT5w8,3087
|
39
|
-
aa_bulletin_board/locale/zh_Hans/LC_MESSAGES/django.po,sha256=
|
40
|
+
aa_bulletin_board/locale/zh_Hans/LC_MESSAGES/django.po,sha256=_rIwVdOAFbDl7YUCIiM6mJeshixakUdqvPCUGJLxZ_c,5943
|
40
41
|
aa_bulletin_board/migrations/0001_initial.py,sha256=bmw6yykfLuujYwQ6uR8rGKqcv94UyEa6ZVH34VR5APQ,2620
|
41
42
|
aa_bulletin_board/migrations/0002_alter_bulletin_slug.py,sha256=j6jgInd8CB7cbRU0cKl87GQaWw6ifZercIs5WCWegKw,427
|
42
43
|
aa_bulletin_board/migrations/0003_group_restrictions.py,sha256=zjWr5H8yfdSsJVLbqUUhgSAfrW6A2CVavrlFxfaFZGg,959
|
@@ -59,9 +60,9 @@ aa_bulletin_board/static/aa_bulletin_board/libs/sumoselect/3.4.9/jquery.sumosele
|
|
59
60
|
aa_bulletin_board/static/aa_bulletin_board/libs/sumoselect/3.4.9/sumoselect.css,sha256=owagDaIXi_FGoJjW_UO4J4_I4PFdFQC4WLOYHxgzM04,9828
|
60
61
|
aa_bulletin_board/static/aa_bulletin_board/libs/sumoselect/3.4.9/sumoselect.min.css,sha256=0muqXQE7xbwFLUkp34AfrbvlKi2OPXgKtUgIZOUYqnY,7610
|
61
62
|
aa_bulletin_board/templates/aa_bulletin_board/base.html,sha256=hL8bzygUC-XYcKO7L014DVZZfXpYYUa_yNwC-1ceBPo,887
|
62
|
-
aa_bulletin_board/templates/aa_bulletin_board/bulletin.html,sha256=
|
63
|
+
aa_bulletin_board/templates/aa_bulletin_board/bulletin.html,sha256=h7R_znls5cwKhXVN67Wi9BVyRGmsGofpFEABqXRPmos,1576
|
63
64
|
aa_bulletin_board/templates/aa_bulletin_board/dashboard.html,sha256=LpFK4leA3O17WCu4zilztSFd-tcINbmyzghBKpFXagU,3030
|
64
|
-
aa_bulletin_board/templates/aa_bulletin_board/edit-bulletin.html,sha256=
|
65
|
+
aa_bulletin_board/templates/aa_bulletin_board/edit-bulletin.html,sha256=3NR5WsRX-0HGUKHJH2LNgkX1JQtDLPpr0Ofy2gi5zDM,2572
|
65
66
|
aa_bulletin_board/templates/aa_bulletin_board/bundles/aa-bulletin-board-css.html,sha256=SXtCZlT5p1Kyif0tlw3fEpXdIkRJIYb5uQRfZZjhISk,93
|
66
67
|
aa_bulletin_board/templates/aa_bulletin_board/bundles/aa-bulletin-board-equal-height-js.html,sha256=QxorfVP6JtqqnJFfDL-2QqLsOKuRyq0mXMiV8a86eVo,112
|
67
68
|
aa_bulletin_board/templates/aa_bulletin_board/bundles/aa-bulletin-board-oembed-js.html,sha256=ckHZgj56V71-w9A25IFWFIj1xxONEV8qROrYn1Fy6IE,106
|
@@ -71,17 +72,18 @@ aa_bulletin_board/templates/aa_bulletin_board/bundles/sumoselect-css.html,sha256
|
|
71
72
|
aa_bulletin_board/templates/aa_bulletin_board/bundles/sumoselect-js.html,sha256=8Cm2j6k7NDREcJvLb_RahZ3yFe_IKAFHPnqEETxMCbw,110
|
72
73
|
aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html,sha256=KsZZZLGllxBPBsAqKFXusPekLJZQYeTDGyBCuyhjAiU,396
|
73
74
|
aa_bulletin_board/templates/aa_bulletin_board/partials/footer/app-translation-footer.html,sha256=nDZPOnsQLBN9meAhxnhd0ynUQIVi3YPzhi47n89zcIg,422
|
74
|
-
aa_bulletin_board/templates/aa_bulletin_board/partials/header/page-header.html,sha256=cE7eVhjS5WUG-x8Kekm1qCdocwHfLDrtc_NsugblFSg,215
|
75
75
|
aa_bulletin_board/templatetags/__init__.py,sha256=sP2D1ovt2gGAPLcGQkByRgXYhvUJ6C52mZMlLIALQ8s,37
|
76
|
-
aa_bulletin_board/templatetags/aa_bulletin_board.py,sha256=
|
76
|
+
aa_bulletin_board/templatetags/aa_bulletin_board.py,sha256=tFdJ81gPKpTsTalmXf0rtDJq7po2gDRNcJ3OdfCP73A,2771
|
77
77
|
aa_bulletin_board/tests/__init__.py,sha256=dcMq6O8W1_8NSZobuRedXFQ3o4Zd6Q6Ti7eY-D6JaYI,18
|
78
78
|
aa_bulletin_board/tests/test_access.py,sha256=I2GaJMI4yQWLb0UIOGPdk754B-Rcw0ORXufa8z9-ljU,6874
|
79
79
|
aa_bulletin_board/tests/test_auth_hooks.py,sha256=8BdVYqfrR0dxvBtOBShklmBXA7MCn2VuF-CT4NdV1xg,2386
|
80
|
-
aa_bulletin_board/tests/test_bulletins.py,sha256=
|
81
|
-
aa_bulletin_board/tests/
|
82
|
-
aa_bulletin_board/tests/
|
80
|
+
aa_bulletin_board/tests/test_bulletins.py,sha256=aXrew1He-ly_OBDPUtXck4NuvXFLpuQ21PxR77LqKSk,8639
|
81
|
+
aa_bulletin_board/tests/test_forms.py,sha256=IbmWR_S0QLNH36ACl4ssmm37mLVgc_6B_osoccZZ2Ds,4719
|
82
|
+
aa_bulletin_board/tests/test_settings.py,sha256=dTQn6dH4tS1vY_q32mkkW6DrzLioB2MHUbpYYoj7708,718
|
83
|
+
aa_bulletin_board/tests/test_templatetags.py,sha256=oQ9kG0DEKFMKp9M60zrmxQaHhUYnPflbgRFPg3KpQ2s,3371
|
84
|
+
aa_bulletin_board/tests/test_user_interface.py,sha256=yM6jRMlY-dF9-tQzYivZhGfoGyySuhl1SetM1KgYPrM,8511
|
83
85
|
aa_bulletin_board/tests/utils.py,sha256=Dh_jVV7s9Z_OOg_08FxwsZtVU3omrcI260-uQ_Bc_90,2202
|
84
|
-
aa_bulletin_board-2.3.
|
85
|
-
aa_bulletin_board-2.3.
|
86
|
-
aa_bulletin_board-2.3.
|
87
|
-
aa_bulletin_board-2.3.
|
86
|
+
aa_bulletin_board-2.3.3.dist-info/METADATA,sha256=VQJJ9TY3SdgFkrA1ZyBo8LArdsExJq4F_rn_WE7AEOM,58061
|
87
|
+
aa_bulletin_board-2.3.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
88
|
+
aa_bulletin_board-2.3.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
89
|
+
aa_bulletin_board-2.3.3.dist-info/RECORD,,
|
aa_bulletin_board/helpers.py
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Our little helpers
|
3
|
-
"""
|
4
|
-
|
5
|
-
# Standard Library
|
6
|
-
import re
|
7
|
-
|
8
|
-
|
9
|
-
def string_cleanup(string: str) -> str:
|
10
|
-
"""
|
11
|
-
Clean up a string by removing JS, CSS and Head tags
|
12
|
-
|
13
|
-
:param string:
|
14
|
-
:type string:
|
15
|
-
:return:
|
16
|
-
:rtype:
|
17
|
-
"""
|
18
|
-
|
19
|
-
re_head = re.compile(
|
20
|
-
pattern=r"<\s*head[^>]*>.*?<\s*/\s*head\s*>", flags=re.S | re.I
|
21
|
-
)
|
22
|
-
re_script = re.compile(
|
23
|
-
pattern=r"<\s*script[^>]*>.*?<\s*/\s*script\s*>", flags=re.S | re.I
|
24
|
-
)
|
25
|
-
re_css = re.compile(
|
26
|
-
pattern=r"<\s*style[^>]*>.*?<\s*/\s*style\s*>", flags=re.S | re.I
|
27
|
-
)
|
28
|
-
|
29
|
-
# Strip unwanted content (JS, CSS, HTML-Head)
|
30
|
-
string = re_head.sub(repl="", string=string)
|
31
|
-
string = re_script.sub(repl="", string=string)
|
32
|
-
string = re_css.sub(repl="", string=string)
|
33
|
-
|
34
|
-
return string
|
File without changes
|
File without changes
|