aa-bulletin-board 2.3.2__py3-none-any.whl → 2.3.4__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/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 +3 -3
- aa_bulletin_board/locale/de/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/locale/django.pot +4 -4
- aa_bulletin_board/locale/es/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/locale/fr_FR/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/locale/it_IT/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/locale/ja/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/locale/ko_KR/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/locale/nl_NL/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/locale/pl_PL/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/locale/ru/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/locale/sk/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/locale/uk/LC_MESSAGES/django.mo +0 -0
- aa_bulletin_board/locale/uk/LC_MESSAGES/django.po +12 -32
- aa_bulletin_board/locale/zh_Hans/LC_MESSAGES/django.po +3 -3
- aa_bulletin_board/models.py +11 -12
- 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/templates/aa_bulletin_board/partials/common/bulletin-board-management.html +9 -3
- aa_bulletin_board/tests/test_bulletins.py +1 -1
- aa_bulletin_board/tests/test_forms.py +181 -0
- aa_bulletin_board/tests/test_user_interface.py +1 -1
- {aa_bulletin_board-2.3.2.dist-info → aa_bulletin_board-2.3.4.dist-info}/METADATA +1 -1
- {aa_bulletin_board-2.3.2.dist-info → aa_bulletin_board-2.3.4.dist-info}/RECORD +31 -31
- 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.2.dist-info → aa_bulletin_board-2.3.4.dist-info}/WHEEL +0 -0
- {aa_bulletin_board-2.3.2.dist-info → aa_bulletin_board-2.3.4.dist-info}/licenses/LICENSE +0 -0
aa_bulletin_board/__init__.py
CHANGED
aa_bulletin_board/auth_hooks.py
CHANGED
@@ -38,10 +38,11 @@ class AaBulletinBoardMenuItem(MenuItemHook): # pylint: disable=too-few-public-m
|
|
38
38
|
:rtype:
|
39
39
|
"""
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
return (
|
42
|
+
MenuItemHook.render(self, request=request)
|
43
|
+
if request.user.has_perm("aa_bulletin_board.basic_access")
|
44
|
+
else ""
|
45
|
+
)
|
45
46
|
|
46
47
|
|
47
48
|
@hooks.register("menu_item_hook")
|
aa_bulletin_board/forms.py
CHANGED
@@ -13,7 +13,7 @@ from django.utils.translation import gettext_lazy as _
|
|
13
13
|
from django_ckeditor_5.widgets import CKEditor5Widget
|
14
14
|
|
15
15
|
# AA Bulletin Board
|
16
|
-
from aa_bulletin_board.
|
16
|
+
from aa_bulletin_board.helper.string import string_cleanup
|
17
17
|
from aa_bulletin_board.models import Bulletin
|
18
18
|
|
19
19
|
|
@@ -105,9 +105,14 @@ class BulletinForm(ModelForm):
|
|
105
105
|
"""
|
106
106
|
|
107
107
|
cleaned_data = super().clean()
|
108
|
+
content = cleaned_data.get("content")
|
108
109
|
|
109
|
-
if not
|
110
|
-
|
110
|
+
if not content or content.strip() == "":
|
111
|
+
self.add_error(
|
112
|
+
"content", ValidationError(_("You have forgotten the content!"))
|
113
|
+
)
|
114
|
+
|
115
|
+
cleaned_data["content"] = content.strip()
|
111
116
|
|
112
117
|
return cleaned_data
|
113
118
|
|
@@ -34,9 +34,7 @@ def calculate_integrity_hash(relative_file_path: str) -> str:
|
|
34
34
|
:rtype: str
|
35
35
|
"""
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
return calculate_integrity(
|
38
|
+
path=Path(os.path.join(APP_STATIC_DIR, relative_file_path)),
|
39
|
+
algorithm=Algorithm.SHA512,
|
40
40
|
)
|
41
|
-
|
42
|
-
return integrity_hash
|
@@ -0,0 +1,22 @@
|
|
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
|
+
# Strip unwanted content (JS, CSS, HTML-Head)
|
20
|
+
return re.compile(
|
21
|
+
pattern=r"<\s*(head|script|style)[^>]*>.*?<\s*/\s*\1\s*>", flags=re.S | re.I
|
22
|
+
).sub(repl="", string=string)
|
@@ -6,7 +6,7 @@ msgid ""
|
|
6
6
|
msgstr ""
|
7
7
|
"Project-Id-Version: PACKAGE VERSION\n"
|
8
8
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
9
|
-
"POT-Creation-Date: 2025-
|
9
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
10
10
|
"PO-Revision-Date: 2024-07-10 14:26+0000\n"
|
11
11
|
"Last-Translator: Dadas Aideron <dadas.aideron@gmail.com>\n"
|
12
12
|
"Language-Team: Czech <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/cs/>\n"
|
@@ -35,7 +35,7 @@ msgstr "Nástěnka"
|
|
35
35
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
36
36
|
msgstr "Omez nástěnku pro určité skupiny. Pokud nejsou nastavena žádná omezení, všichni s přístupem k tomuto modulu můžou číst tuto nástěnku."
|
37
37
|
|
38
|
-
#: aa_bulletin_board/forms.py:
|
38
|
+
#: aa_bulletin_board/forms.py:112
|
39
39
|
msgid "You have forgotten the content!"
|
40
40
|
msgstr "Zapomněl jsi obsah!"
|
41
41
|
|
@@ -129,7 +129,7 @@ msgstr "Aktualizovat nástěnku"
|
|
129
129
|
msgid "Create bulletin"
|
130
130
|
msgstr "Vytvořit nástěnku"
|
131
131
|
|
132
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
132
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
133
133
|
msgid "Add bulletin"
|
134
134
|
msgstr "Přidat nástěnku"
|
135
135
|
|
@@ -6,7 +6,7 @@ msgid ""
|
|
6
6
|
msgstr ""
|
7
7
|
"Project-Id-Version: PACKAGE VERSION\n"
|
8
8
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
9
|
-
"POT-Creation-Date: 2025-
|
9
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
10
10
|
"PO-Revision-Date: 2024-05-10 13:57+0000\n"
|
11
11
|
"Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
|
12
12
|
"Language-Team: German <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/de/>\n"
|
@@ -35,7 +35,7 @@ msgstr "Bulletin Board"
|
|
35
35
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
36
36
|
msgstr "Beschränkt dieses Bulletin auf bestimmte Gruppen. Wenn keine Gruppenbeschränkungen bestehen, kann jeder der Zugriff auf dieses Modul hat, dieses Bulletin lesen."
|
37
37
|
|
38
|
-
#: aa_bulletin_board/forms.py:
|
38
|
+
#: aa_bulletin_board/forms.py:112
|
39
39
|
msgid "You have forgotten the content!"
|
40
40
|
msgstr "Du hast den Inhalt vergessen!"
|
41
41
|
|
@@ -127,7 +127,7 @@ msgstr "Bulletin aktualisieren"
|
|
127
127
|
msgid "Create bulletin"
|
128
128
|
msgstr "Bulletin erstellen"
|
129
129
|
|
130
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
130
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
131
131
|
msgid "Add bulletin"
|
132
132
|
msgstr "Bulletin hinzufügen"
|
133
133
|
|
@@ -6,9 +6,9 @@
|
|
6
6
|
#, fuzzy
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version: AA Bulletin Board 2.3.
|
9
|
+
"Project-Id-Version: AA Bulletin Board 2.3.4\n"
|
10
10
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
11
|
-
"POT-Creation-Date: 2025-
|
11
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
12
12
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
@@ -38,7 +38,7 @@ msgid ""
|
|
38
38
|
"place, everyone who has access to this module can read this bulletin."
|
39
39
|
msgstr ""
|
40
40
|
|
41
|
-
#: aa_bulletin_board/forms.py:
|
41
|
+
#: aa_bulletin_board/forms.py:112
|
42
42
|
msgid "You have forgotten the content!"
|
43
43
|
msgstr ""
|
44
44
|
|
@@ -130,7 +130,7 @@ msgstr ""
|
|
130
130
|
msgid "Create bulletin"
|
131
131
|
msgstr ""
|
132
132
|
|
133
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
133
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
134
134
|
msgid "Add bulletin"
|
135
135
|
msgstr ""
|
136
136
|
|
@@ -8,7 +8,7 @@ msgid ""
|
|
8
8
|
msgstr ""
|
9
9
|
"Project-Id-Version: PACKAGE VERSION\n"
|
10
10
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
11
|
-
"POT-Creation-Date: 2025-
|
11
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
12
12
|
"PO-Revision-Date: 2024-12-02 17:40+0000\n"
|
13
13
|
"Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
|
14
14
|
"Language-Team: Spanish <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/es/>\n"
|
@@ -37,7 +37,7 @@ msgstr "Tablón de Anuncios"
|
|
37
37
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
38
38
|
msgstr "Restringir este anuncio a ciertos grupos. Si no existen restricciones de grupo, todos los que tengan acceso a este módulo pueden leer este anuncio."
|
39
39
|
|
40
|
-
#: aa_bulletin_board/forms.py:
|
40
|
+
#: aa_bulletin_board/forms.py:112
|
41
41
|
msgid "You have forgotten the content!"
|
42
42
|
msgstr "Ha olvidado el contenido"
|
43
43
|
|
@@ -139,7 +139,7 @@ msgstr "Actualizar Anuncio"
|
|
139
139
|
msgid "Create bulletin"
|
140
140
|
msgstr "Crear Anuncio"
|
141
141
|
|
142
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
142
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
143
143
|
#, fuzzy
|
144
144
|
#| msgid "Add Bulletin"
|
145
145
|
msgid "Add bulletin"
|
@@ -10,7 +10,7 @@ msgid ""
|
|
10
10
|
msgstr ""
|
11
11
|
"Project-Id-Version: PACKAGE VERSION\n"
|
12
12
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
13
|
-
"POT-Creation-Date: 2025-
|
13
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
14
14
|
"PO-Revision-Date: 2025-01-22 06:17+0000\n"
|
15
15
|
"Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
|
16
16
|
"Language-Team: French <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/fr/>\n"
|
@@ -40,7 +40,7 @@ msgstr "Tableau d'affichage"
|
|
40
40
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
41
41
|
msgstr "Restreignez ce bulletin à certains groupes. Si aucune restriction de groupe n'est en place, tous ceux qui ont accès à ce module peuvent lire ce bulletin."
|
42
42
|
|
43
|
-
#: aa_bulletin_board/forms.py:
|
43
|
+
#: aa_bulletin_board/forms.py:112
|
44
44
|
msgid "You have forgotten the content!"
|
45
45
|
msgstr "Vous avez oublié le contenu !"
|
46
46
|
|
@@ -137,7 +137,7 @@ msgstr ""
|
|
137
137
|
msgid "Create bulletin"
|
138
138
|
msgstr ""
|
139
139
|
|
140
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
140
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
141
141
|
msgid "Add bulletin"
|
142
142
|
msgstr ""
|
143
143
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
7
7
|
msgstr ""
|
8
8
|
"Project-Id-Version: PACKAGE VERSION\n"
|
9
9
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
10
|
-
"POT-Creation-Date: 2025-
|
10
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
11
11
|
"PO-Revision-Date: 2024-12-22 21:15+0000\n"
|
12
12
|
"Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
|
13
13
|
"Language-Team: Italian <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/it/>\n"
|
@@ -36,7 +36,7 @@ msgstr "Bacheca"
|
|
36
36
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
37
37
|
msgstr ""
|
38
38
|
|
39
|
-
#: aa_bulletin_board/forms.py:
|
39
|
+
#: aa_bulletin_board/forms.py:112
|
40
40
|
msgid "You have forgotten the content!"
|
41
41
|
msgstr ""
|
42
42
|
|
@@ -128,7 +128,7 @@ msgstr ""
|
|
128
128
|
msgid "Create bulletin"
|
129
129
|
msgstr ""
|
130
130
|
|
131
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
131
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
132
132
|
msgid "Add bulletin"
|
133
133
|
msgstr ""
|
134
134
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
7
7
|
msgstr ""
|
8
8
|
"Project-Id-Version: PACKAGE VERSION\n"
|
9
9
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
10
|
-
"POT-Creation-Date: 2025-
|
10
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
11
11
|
"PO-Revision-Date: 2024-08-05 10:10+0000\n"
|
12
12
|
"Last-Translator: Anata_no_Usiro <yt23542354m@gmail.com>\n"
|
13
13
|
"Language-Team: Japanese <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/ja/>\n"
|
@@ -36,7 +36,7 @@ msgstr "掲示板"
|
|
36
36
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
37
37
|
msgstr "この情報を特定のグループに制限する。グループ制限がない場合、このモジュールにアクセスできる全員がこの情報を読むことができます。"
|
38
38
|
|
39
|
-
#: aa_bulletin_board/forms.py:
|
39
|
+
#: aa_bulletin_board/forms.py:112
|
40
40
|
msgid "You have forgotten the content!"
|
41
41
|
msgstr "内容を忘れています!"
|
42
42
|
|
@@ -127,7 +127,7 @@ msgstr ""
|
|
127
127
|
msgid "Create bulletin"
|
128
128
|
msgstr ""
|
129
129
|
|
130
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
130
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
131
131
|
msgid "Add bulletin"
|
132
132
|
msgstr ""
|
133
133
|
|
@@ -9,7 +9,7 @@ msgid ""
|
|
9
9
|
msgstr ""
|
10
10
|
"Project-Id-Version: PACKAGE VERSION\n"
|
11
11
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
12
|
-
"POT-Creation-Date: 2025-
|
12
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
13
13
|
"PO-Revision-Date: 2024-05-10 13:57+0000\n"
|
14
14
|
"Last-Translator: Rodpold Shard <rodpold@gmail.com>\n"
|
15
15
|
"Language-Team: Korean <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/ko/>\n"
|
@@ -38,7 +38,7 @@ msgstr "불레틴 보드"
|
|
38
38
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
39
39
|
msgstr "불레틴 보드의 항목을 그룹별로 열람을 제한할 수 있습니다. 그룹 제한이 없다면, 모듈의 접근 권한이 있는 모든 사용자가 이 항목을 열람할 수 있습니다."
|
40
40
|
|
41
|
-
#: aa_bulletin_board/forms.py:
|
41
|
+
#: aa_bulletin_board/forms.py:112
|
42
42
|
msgid "You have forgotten the content!"
|
43
43
|
msgstr "내용을 잊어버리셨군요!"
|
44
44
|
|
@@ -141,7 +141,7 @@ msgstr "불레틴 업데이트"
|
|
141
141
|
msgid "Create bulletin"
|
142
142
|
msgstr "불레틴 생성"
|
143
143
|
|
144
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
144
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
145
145
|
#, fuzzy
|
146
146
|
#| msgid "Add Bulletin"
|
147
147
|
msgid "Add bulletin"
|
@@ -7,7 +7,7 @@ msgid ""
|
|
7
7
|
msgstr ""
|
8
8
|
"Project-Id-Version: PACKAGE VERSION\n"
|
9
9
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
10
|
-
"POT-Creation-Date: 2025-
|
10
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
11
11
|
"PO-Revision-Date: 2024-05-10 13:57+0000\n"
|
12
12
|
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
13
13
|
"Language-Team: Dutch <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/nl/>\n"
|
@@ -36,7 +36,7 @@ msgstr ""
|
|
36
36
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
37
37
|
msgstr ""
|
38
38
|
|
39
|
-
#: aa_bulletin_board/forms.py:
|
39
|
+
#: aa_bulletin_board/forms.py:112
|
40
40
|
msgid "You have forgotten the content!"
|
41
41
|
msgstr ""
|
42
42
|
|
@@ -128,7 +128,7 @@ msgstr ""
|
|
128
128
|
msgid "Create bulletin"
|
129
129
|
msgstr ""
|
130
130
|
|
131
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
131
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
132
132
|
msgid "Add bulletin"
|
133
133
|
msgstr ""
|
134
134
|
|
@@ -6,7 +6,7 @@ msgid ""
|
|
6
6
|
msgstr ""
|
7
7
|
"Project-Id-Version: PACKAGE VERSION\n"
|
8
8
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
9
|
-
"POT-Creation-Date: 2025-
|
9
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
10
10
|
"PO-Revision-Date: 2024-05-10 13:57+0000\n"
|
11
11
|
"Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
|
12
12
|
"Language-Team: Polish <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/pl/>\n"
|
@@ -35,7 +35,7 @@ msgstr ""
|
|
35
35
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
36
36
|
msgstr ""
|
37
37
|
|
38
|
-
#: aa_bulletin_board/forms.py:
|
38
|
+
#: aa_bulletin_board/forms.py:112
|
39
39
|
msgid "You have forgotten the content!"
|
40
40
|
msgstr ""
|
41
41
|
|
@@ -128,7 +128,7 @@ msgstr ""
|
|
128
128
|
msgid "Create bulletin"
|
129
129
|
msgstr ""
|
130
130
|
|
131
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
131
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
132
132
|
msgid "Add bulletin"
|
133
133
|
msgstr ""
|
134
134
|
|
@@ -9,7 +9,7 @@ msgid ""
|
|
9
9
|
msgstr ""
|
10
10
|
"Project-Id-Version: PACKAGE VERSION\n"
|
11
11
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
12
|
-
"POT-Creation-Date: 2025-
|
12
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
13
13
|
"PO-Revision-Date: 2024-06-07 13:27+0000\n"
|
14
14
|
"Last-Translator: Roycce_ <malyasov.roma@mail.ru>\n"
|
15
15
|
"Language-Team: Russian <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/ru/>\n"
|
@@ -38,7 +38,7 @@ msgstr "Доска бюллетеней"
|
|
38
38
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
39
39
|
msgstr "Ограничить доступ к бюллетеню для конкретных групп. Если ограничение не задано, у всех пользователей модуля есть доступ к бюллетеню."
|
40
40
|
|
41
|
-
#: aa_bulletin_board/forms.py:
|
41
|
+
#: aa_bulletin_board/forms.py:112
|
42
42
|
msgid "You have forgotten the content!"
|
43
43
|
msgstr "Вы забыли содержание!"
|
44
44
|
|
@@ -132,7 +132,7 @@ msgstr "Обновить бюллетень"
|
|
132
132
|
msgid "Create bulletin"
|
133
133
|
msgstr "Создать бюллетень"
|
134
134
|
|
135
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
135
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
136
136
|
msgid "Add bulletin"
|
137
137
|
msgstr "Добавить бюллетень"
|
138
138
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
7
7
|
msgstr ""
|
8
8
|
"Project-Id-Version: PACKAGE VERSION\n"
|
9
9
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
10
|
-
"POT-Creation-Date: 2025-
|
10
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
11
11
|
"PO-Revision-Date: 2024-05-10 13:57+0000\n"
|
12
12
|
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
13
13
|
"Language-Team: Slovak <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/sk/>\n"
|
@@ -36,7 +36,7 @@ msgstr ""
|
|
36
36
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
37
37
|
msgstr ""
|
38
38
|
|
39
|
-
#: aa_bulletin_board/forms.py:
|
39
|
+
#: aa_bulletin_board/forms.py:112
|
40
40
|
msgid "You have forgotten the content!"
|
41
41
|
msgstr ""
|
42
42
|
|
@@ -130,7 +130,7 @@ msgstr ""
|
|
130
130
|
msgid "Create bulletin"
|
131
131
|
msgstr ""
|
132
132
|
|
133
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
133
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
134
134
|
msgid "Add bulletin"
|
135
135
|
msgstr ""
|
136
136
|
|
Binary file
|
@@ -9,8 +9,8 @@ msgid ""
|
|
9
9
|
msgstr ""
|
10
10
|
"Project-Id-Version: PACKAGE VERSION\n"
|
11
11
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
12
|
-
"POT-Creation-Date: 2025-
|
13
|
-
"PO-Revision-Date: 2025-
|
12
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
13
|
+
"PO-Revision-Date: 2025-03-23 13:24+0000\n"
|
14
14
|
"Last-Translator: M <skrypets@gmail.com>\n"
|
15
15
|
"Language-Team: Ukrainian <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/uk/>\n"
|
16
16
|
"Language: uk\n"
|
@@ -18,7 +18,7 @@ msgstr ""
|
|
18
18
|
"Content-Type: text/plain; charset=UTF-8\n"
|
19
19
|
"Content-Transfer-Encoding: 8bit\n"
|
20
20
|
"Plural-Forms: nplurals=4; plural=n==1 ? 3 : (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
21
|
-
"X-Generator: Weblate 5.10.
|
21
|
+
"X-Generator: Weblate 5.10.4\n"
|
22
22
|
|
23
23
|
#. Translators: This is the app name and version, which will appear in the Django Backend
|
24
24
|
#: aa_bulletin_board/apps.py:22
|
@@ -38,9 +38,9 @@ msgstr "Дошка оголошень"
|
|
38
38
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
39
39
|
msgstr "Обмежте доступ до цього бюлетеня для певних груп. Якщо не встановлено жодних групових обмежень, кожен, хто має доступ до цього модуля, зможе прочитати цей бюлетень."
|
40
40
|
|
41
|
-
#: aa_bulletin_board/forms.py:
|
41
|
+
#: aa_bulletin_board/forms.py:112
|
42
42
|
msgid "You have forgotten the content!"
|
43
|
-
msgstr ""
|
43
|
+
msgstr "Вміст відсутній!"
|
44
44
|
|
45
45
|
#: aa_bulletin_board/models.py:72
|
46
46
|
msgid "Can access this app"
|
@@ -48,7 +48,7 @@ msgstr "Має доступ до цього додатку"
|
|
48
48
|
|
49
49
|
#: aa_bulletin_board/models.py:73
|
50
50
|
msgid "Can manage (add/change/remove) bulletins"
|
51
|
-
msgstr ""
|
51
|
+
msgstr "Може кеурувати (створювати/змінювати/видаляти) бюлетені"
|
52
52
|
|
53
53
|
#: aa_bulletin_board/models.py:82
|
54
54
|
msgid "Title"
|
@@ -66,7 +66,7 @@ msgstr "Створено"
|
|
66
66
|
#. Translators: This is the date and time the bulletin has been updated
|
67
67
|
#: aa_bulletin_board/models.py:97
|
68
68
|
msgid "Updated"
|
69
|
-
msgstr ""
|
69
|
+
msgstr "Оновлено"
|
70
70
|
|
71
71
|
#: aa_bulletin_board/models.py:106
|
72
72
|
msgid "User"
|
@@ -100,53 +100,39 @@ msgid "Delete"
|
|
100
100
|
msgstr "Видалити"
|
101
101
|
|
102
102
|
#: aa_bulletin_board/templates/aa_bulletin_board/dashboard.html:17
|
103
|
-
#, fuzzy
|
104
|
-
#| msgid "This bulletin is restricted to the following group(s):"
|
105
103
|
msgid "This bulletin is restricted to the following group:"
|
106
104
|
msgid_plural "This bulletin is restricted to the following groups:"
|
107
105
|
msgstr[0] "Доступ до цього бюлетеня обмежений для наступних груп:"
|
108
106
|
msgstr[1] "Доступ до цього бюлетеня обмежений для наступних груп:"
|
109
107
|
msgstr[2] "Доступ до цього бюлетеня обмежений для наступних груп:"
|
110
|
-
msgstr[3] "Доступ до цього бюлетеня обмежений для
|
108
|
+
msgstr[3] "Доступ до цього бюлетеня обмежений для наступної групи:"
|
111
109
|
|
112
110
|
#: aa_bulletin_board/templates/aa_bulletin_board/dashboard.html:33
|
113
111
|
msgid "Read more"
|
114
112
|
msgstr "Читати далі"
|
115
113
|
|
116
114
|
#: aa_bulletin_board/templates/aa_bulletin_board/dashboard.html:47
|
117
|
-
#, fuzzy
|
118
|
-
#| msgid "Bulletin Board"
|
119
115
|
msgid "No bulletins found."
|
120
|
-
msgstr "
|
116
|
+
msgstr "Не зайдено бюлетеня."
|
121
117
|
|
122
118
|
#: aa_bulletin_board/templates/aa_bulletin_board/edit-bulletin.html:11
|
123
|
-
#, fuzzy
|
124
|
-
#| msgid "Edit Bulletin"
|
125
119
|
msgid "Edit bulletin"
|
126
120
|
msgstr "Редагувати бюлетень"
|
127
121
|
|
128
122
|
#: aa_bulletin_board/templates/aa_bulletin_board/edit-bulletin.html:14
|
129
123
|
#: aa_bulletin_board/templates/aa_bulletin_board/edit-bulletin.html:25
|
130
|
-
#, fuzzy
|
131
|
-
#| msgid "Create New Bulletin"
|
132
124
|
msgid "Create new bulletin"
|
133
125
|
msgstr "Створити новий бюлетень"
|
134
126
|
|
135
127
|
#: aa_bulletin_board/templates/aa_bulletin_board/edit-bulletin.html:45
|
136
|
-
#, fuzzy
|
137
|
-
#| msgid "Update Bulletin"
|
138
128
|
msgid "Update bulletin"
|
139
|
-
msgstr "
|
129
|
+
msgstr "Оновити бюлетень"
|
140
130
|
|
141
131
|
#: aa_bulletin_board/templates/aa_bulletin_board/edit-bulletin.html:47
|
142
|
-
#, fuzzy
|
143
|
-
#| msgid "Create Bulletin"
|
144
132
|
msgid "Create bulletin"
|
145
133
|
msgstr "Створити бюлетень"
|
146
134
|
|
147
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
148
|
-
#, fuzzy
|
149
|
-
#| msgid "Add Bulletin"
|
135
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
150
136
|
msgid "Add bulletin"
|
151
137
|
msgstr "Додати інформаційний бюлетень"
|
152
138
|
|
@@ -164,14 +150,10 @@ msgid "Bulletin \"{bulletin__title}\" created."
|
|
164
150
|
msgstr "Створено бюлетень «{bulletin__title}»."
|
165
151
|
|
166
152
|
#: aa_bulletin_board/views.py:141
|
167
|
-
#, fuzzy
|
168
|
-
#| msgid "The bulletin you are looking for does not exist, or you don't have access to it."
|
169
153
|
msgid "The bulletin you are looking for does either not exist, or you don't have access to it."
|
170
154
|
msgstr "Бюлетень, який ви шукаєте, не існує, або у вас немає до нього доступу."
|
171
155
|
|
172
156
|
#: aa_bulletin_board/views.py:168
|
173
|
-
#, fuzzy
|
174
|
-
#| msgid "The bulletin you are trying to edit for does not exist."
|
175
157
|
msgid "The bulletin you are trying to edit does not exist."
|
176
158
|
msgstr "Бюлетень, який ви намагаєтеся відредагувати, не існує."
|
177
159
|
|
@@ -186,7 +168,5 @@ msgid "Bulletin \"{bulletin.title}\" deleted."
|
|
186
168
|
msgstr "Бюлетень «{bulletin.title}» вилучено."
|
187
169
|
|
188
170
|
#: aa_bulletin_board/views.py:234
|
189
|
-
#, fuzzy
|
190
|
-
#| msgid "The bulletin you are trying to delete for does not exist."
|
191
171
|
msgid "The bulletin you are trying to delete does not exist."
|
192
|
-
msgstr "
|
172
|
+
msgstr "Бюлетень, яке ви намагаєтеся видалити, не існує."
|
@@ -10,7 +10,7 @@ msgid ""
|
|
10
10
|
msgstr ""
|
11
11
|
"Project-Id-Version: PACKAGE VERSION\n"
|
12
12
|
"Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-bulletin-board/issues\n"
|
13
|
-
"POT-Creation-Date: 2025-
|
13
|
+
"POT-Creation-Date: 2025-04-09 10:02+0200\n"
|
14
14
|
"PO-Revision-Date: 2024-05-28 16:27+0000\n"
|
15
15
|
"Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
|
16
16
|
"Language-Team: Chinese (Simplified) <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-bulletin-board/zh_Hans/>\n"
|
@@ -39,7 +39,7 @@ msgstr "公告栏"
|
|
39
39
|
msgid "Restrict this bulletin to certain groups. If no group restrictions are in place, everyone who has access to this module can read this bulletin."
|
40
40
|
msgstr "限制此公告为特定组可阅读。如果没有设置组限制,每个访问此模块的人都可以阅读此公告。"
|
41
41
|
|
42
|
-
#: aa_bulletin_board/forms.py:
|
42
|
+
#: aa_bulletin_board/forms.py:112
|
43
43
|
msgid "You have forgotten the content!"
|
44
44
|
msgstr "你忘记了内容!"
|
45
45
|
|
@@ -130,7 +130,7 @@ msgstr "更新公告"
|
|
130
130
|
msgid "Create bulletin"
|
131
131
|
msgstr "创建公告"
|
132
132
|
|
133
|
-
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:
|
133
|
+
#: aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html:4
|
134
134
|
msgid "Add bulletin"
|
135
135
|
msgstr "添加公告"
|
136
136
|
|
aa_bulletin_board/models.py
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
The models
|
3
3
|
"""
|
4
4
|
|
5
|
+
# Standard Library
|
6
|
+
from typing import ClassVar
|
7
|
+
|
5
8
|
# Third Party
|
6
9
|
import unidecode
|
7
10
|
|
@@ -16,7 +19,7 @@ from django_ckeditor_5.fields import CKEditor5Field
|
|
16
19
|
|
17
20
|
# AA Bulletin Board
|
18
21
|
from aa_bulletin_board.constants import APP_TITLE
|
19
|
-
from aa_bulletin_board.
|
22
|
+
from aa_bulletin_board.helper.string import string_cleanup
|
20
23
|
from aa_bulletin_board.managers import BulletinManager
|
21
24
|
|
22
25
|
|
@@ -41,16 +44,13 @@ def get_bulletin_slug_from_title(bulletin_title: str) -> str:
|
|
41
44
|
:rtype:
|
42
45
|
"""
|
43
46
|
|
44
|
-
|
45
|
-
bulletin_slug
|
46
|
-
|
47
|
-
)
|
47
|
+
base_slug = slugify(value=unidecode.unidecode(bulletin_title), allow_unicode=True)
|
48
|
+
bulletin_slug = base_slug
|
49
|
+
run = 0
|
48
50
|
|
49
51
|
while Bulletin.objects.filter(slug=bulletin_slug).exists():
|
50
52
|
run += 1
|
51
|
-
bulletin_slug
|
52
|
-
value=unidecode.unidecode(f"{bulletin_title}-{run}"), allow_unicode=True
|
53
|
-
)
|
53
|
+
bulletin_slug = f"{base_slug}-{run}"
|
54
54
|
|
55
55
|
return bulletin_slug
|
56
56
|
|
@@ -112,7 +112,7 @@ class Bulletin(models.Model):
|
|
112
112
|
verbose_name=_("Group restrictions"),
|
113
113
|
)
|
114
114
|
|
115
|
-
objects = BulletinManager()
|
115
|
+
objects: ClassVar[BulletinManager] = BulletinManager()
|
116
116
|
|
117
117
|
class Meta: # pylint: disable=too-few-public-methods
|
118
118
|
"""
|
@@ -141,8 +141,7 @@ class Bulletin(models.Model):
|
|
141
141
|
|
142
142
|
self.content = string_cleanup(string=self.content)
|
143
143
|
|
144
|
-
if self.slug
|
145
|
-
|
146
|
-
self.slug = bulletin_slug
|
144
|
+
if not self.slug:
|
145
|
+
self.slug = get_bulletin_slug_from_title(bulletin_title=self.title)
|
147
146
|
|
148
147
|
super().save(*args, **kwargs)
|
@@ -5,7 +5,7 @@
|
|
5
5
|
{% block page_title %}{{ bulletin.title }} » {% translate "Bulletin Board" %}{% endblock %}
|
6
6
|
|
7
7
|
{% block aabulletinboard_header %}
|
8
|
-
{% include "
|
8
|
+
{% include "framework/header/page-header.html" with title=bulletin.title %}
|
9
9
|
{% endblock %}
|
10
10
|
|
11
11
|
{% block aabulletinboard_body %}
|
@@ -20,10 +20,10 @@
|
|
20
20
|
|
21
21
|
{% block aabulletinboard_header %}
|
22
22
|
{% if bulletin %}
|
23
|
-
{% include "
|
23
|
+
{% include "framework/header/page-header.html" with title=bulletin.title %}
|
24
24
|
{% else %}
|
25
25
|
{% translate "Create new bulletin" as header_text %}
|
26
|
-
{% include "
|
26
|
+
{% include "framework/header/page-header.html" with title=header_text %}
|
27
27
|
{% endif %}
|
28
28
|
{% endblock %}
|
29
29
|
|
aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
{% load i18n %}
|
2
2
|
|
3
3
|
{% if perms.aa_bulletin_board.manage_bulletins %}
|
4
|
+
{% translate "Add bulletin" as button_text %}
|
5
|
+
|
4
6
|
<li class="nav-item">
|
5
|
-
<a class="nav-link py-0" href="{% url 'aa_bulletin_board:create_bulletin' %}">
|
6
|
-
<span class="btn btn-success btn-add-bulletin">
|
7
|
-
{
|
7
|
+
<a class="nav-link py-lg-0" href="{% url 'aa_bulletin_board:create_bulletin' %}">
|
8
|
+
<span class="btn btn-success btn-add-bulletin d-none d-lg-inline-block">
|
9
|
+
{{ button_text|title }}
|
10
|
+
</span>
|
11
|
+
|
12
|
+
<span class="d-inline-block d-lg-none">
|
13
|
+
<i class="fa-solid fa-plus me-2"></i>
|
8
14
|
{{ button_text|title }}
|
9
15
|
</span>
|
10
16
|
</a>
|
@@ -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>")
|
@@ -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.4
|
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,43 +1,43 @@
|
|
1
|
-
aa_bulletin_board/__init__.py,sha256=
|
1
|
+
aa_bulletin_board/__init__.py,sha256=aWtCYDwQsVL3irR2utkAEIN7UuDiajTb0D3KtXzWDRs,133
|
2
2
|
aa_bulletin_board/app_settings.py,sha256=59zkVfW3JHj4kfovIFZYt3kWdXqDmBSF4kaIN0W6m40,244
|
3
3
|
aa_bulletin_board/apps.py,sha256=RzL8kLrLzWMC3Q2VBAI8snXRTehqZ8TKtNozdrZe20A,513
|
4
|
-
aa_bulletin_board/auth_hooks.py,sha256=
|
4
|
+
aa_bulletin_board/auth_hooks.py,sha256=F-5_gP7HI5RzwlF9GqI_pJTyOtq-V-ZhZLSpjpyQSe4,1456
|
5
5
|
aa_bulletin_board/constants.py,sha256=FiSn7zyC39ubomxujNXX05_LHykhDRx0Hk-7Ao4LEtQ,446
|
6
|
-
aa_bulletin_board/forms.py,sha256=
|
7
|
-
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
|
8
7
|
aa_bulletin_board/managers.py,sha256=BIoUNyLOpJftKs4I05eG2DC6zPGWzCrFhL2nAGUMVos,1066
|
9
|
-
aa_bulletin_board/models.py,sha256=
|
8
|
+
aa_bulletin_board/models.py,sha256=gC3PODFHWfC_2ljGppE5CBNPIrg0xIhp4G4InU8JL-g,3604
|
10
9
|
aa_bulletin_board/urls.py,sha256=giE7z-t8zpC3mPzPYblMLrkSTn5v7ad4NoJsSk-Jsfg,595
|
11
10
|
aa_bulletin_board/views.py,sha256=Eo5UHFMgbt1fuoh02gUKot58SG4d60XEfQWI1uJhlc8,6531
|
12
11
|
aa_bulletin_board/helper/__init__.py,sha256=Xdjx16QiK1MmVpJ2Je074ddMWzhnyRX7omuxPomMaow,51
|
13
|
-
aa_bulletin_board/helper/static_files.py,sha256=
|
14
|
-
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=QMgJpLh6w5vwJ2L82TX7ESyDKXTzT2LsNkvePOqyfxE,4909
|
15
15
|
aa_bulletin_board/locale/cs_CZ/LC_MESSAGES/django.mo,sha256=ZhKB7486VzGz4lS72jucN0JWc3TPzADIo7UuN2sf5S8,3462
|
16
|
-
aa_bulletin_board/locale/cs_CZ/LC_MESSAGES/django.po,sha256=
|
16
|
+
aa_bulletin_board/locale/cs_CZ/LC_MESSAGES/django.po,sha256=GEq7RZ0DZ5oRSge_mdMRSasA5fz8sNm3Cr0UF-dRcEg,6241
|
17
17
|
aa_bulletin_board/locale/de/LC_MESSAGES/django.mo,sha256=m0YvI06FxR60jNRQDoy7_k-Yl1thl2VAoOqKoDeMdNg,3404
|
18
|
-
aa_bulletin_board/locale/de/LC_MESSAGES/django.po,sha256=
|
18
|
+
aa_bulletin_board/locale/de/LC_MESSAGES/django.po,sha256=7SXqX3ipL7o0N5kvigh6lBhBMBV6fnhPS0es93aN194,6146
|
19
19
|
aa_bulletin_board/locale/es/LC_MESSAGES/django.mo,sha256=kTDcOFWmMZ6EMuAm0MPLdyj4S57f_DhNPvCeEjCh40s,2665
|
20
|
-
aa_bulletin_board/locale/es/LC_MESSAGES/django.po,sha256=
|
20
|
+
aa_bulletin_board/locale/es/LC_MESSAGES/django.po,sha256=0q5S2utpCocoFWzxtxysmJpfJDlaz7rCjsEPZtnQXEE,6418
|
21
21
|
aa_bulletin_board/locale/fr_FR/LC_MESSAGES/django.mo,sha256=lCwF9Wa3wq6WqSAkrbBpDddAVEh2txGr_bPId74A3p0,1861
|
22
|
-
aa_bulletin_board/locale/fr_FR/LC_MESSAGES/django.po,sha256=
|
22
|
+
aa_bulletin_board/locale/fr_FR/LC_MESSAGES/django.po,sha256=3pe-4K8FqN2deXiPwu8WzPe8VhyeYivtlVxULi0ZFeA,5961
|
23
23
|
aa_bulletin_board/locale/it_IT/LC_MESSAGES/django.mo,sha256=7eI69SSNv6OgS0bso_Mrw3DtapHmJXEyu_mqd7ke0dg,657
|
24
|
-
aa_bulletin_board/locale/it_IT/LC_MESSAGES/django.po,sha256=
|
24
|
+
aa_bulletin_board/locale/it_IT/LC_MESSAGES/django.po,sha256=kE1BzPusOmiXxKe1bUmwUdj_xhNh4ZPyz8GoU8wv85s,5080
|
25
25
|
aa_bulletin_board/locale/ja/LC_MESSAGES/django.mo,sha256=W8hWAIEQSTj1iJqMJFLjlp2Roeljr8dluVVSEHBw0bw,1503
|
26
|
-
aa_bulletin_board/locale/ja/LC_MESSAGES/django.po,sha256=
|
26
|
+
aa_bulletin_board/locale/ja/LC_MESSAGES/django.po,sha256=K4ezv6eG39gVs0RnegoR724HIpfTsb5Vpj7FXDu6XNE,5430
|
27
27
|
aa_bulletin_board/locale/ko_KR/LC_MESSAGES/django.mo,sha256=mTVxpRnoj-ErNxF0Y5gdbKVqNT0Za4p5DW0tBs2tURw,2569
|
28
|
-
aa_bulletin_board/locale/ko_KR/LC_MESSAGES/django.po,sha256=
|
28
|
+
aa_bulletin_board/locale/ko_KR/LC_MESSAGES/django.po,sha256=Js4s7s3qB_Io2cmRf1KqzD4OkOBwXPnYDabRbaugQGo,6529
|
29
29
|
aa_bulletin_board/locale/nl_NL/LC_MESSAGES/django.mo,sha256=tomc7fMl3JZoZ_I1hTgDDigFt3RyaiR-3sTD7xYhg98,483
|
30
|
-
aa_bulletin_board/locale/nl_NL/LC_MESSAGES/django.po,sha256=
|
30
|
+
aa_bulletin_board/locale/nl_NL/LC_MESSAGES/django.po,sha256=WqOJApz-BmQcdDdRHaOoECV-VcBCTuDJ8beZcgXHLfQ,4971
|
31
31
|
aa_bulletin_board/locale/pl_PL/LC_MESSAGES/django.mo,sha256=W2q9nAX8EDr7lLDhaJW1WChLwF1v7hy1H71g5n38f18,876
|
32
|
-
aa_bulletin_board/locale/pl_PL/LC_MESSAGES/django.po,sha256=
|
32
|
+
aa_bulletin_board/locale/pl_PL/LC_MESSAGES/django.po,sha256=Rmyb5n6vRbv0JLDbmtjsfcwAgfnn7pCAmkKAyg7Kp6Y,5188
|
33
33
|
aa_bulletin_board/locale/ru/LC_MESSAGES/django.mo,sha256=ZUmnbwwBgHs5m0RzyMPZvtpVkaV9Rylwg1gQCa9-dcc,4341
|
34
|
-
aa_bulletin_board/locale/ru/LC_MESSAGES/django.po,sha256=
|
34
|
+
aa_bulletin_board/locale/ru/LC_MESSAGES/django.po,sha256=Ra1vBT_Ho2BASWMyWpjaeiYZpNuFXxwF77Zz00ZM8g0,7233
|
35
35
|
aa_bulletin_board/locale/sk/LC_MESSAGES/django.mo,sha256=qbQEKRh_K6GhMhKVY-xR1tC5YIofxLCprGaDq6bltcM,562
|
36
|
-
aa_bulletin_board/locale/sk/LC_MESSAGES/django.po,sha256=
|
37
|
-
aa_bulletin_board/locale/uk/LC_MESSAGES/django.mo,sha256=
|
38
|
-
aa_bulletin_board/locale/uk/LC_MESSAGES/django.po,sha256=
|
36
|
+
aa_bulletin_board/locale/sk/LC_MESSAGES/django.po,sha256=ipQOkNWBt5mmOxqCkEOTofnCax43ga1kvB3EwaxPtBQ,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=hi2sr1sN5lonayC0-w3XByvyZ0s0-hKkGbHnd5dSrsU,7390
|
39
39
|
aa_bulletin_board/locale/zh_Hans/LC_MESSAGES/django.mo,sha256=eWtNtT-OkgeZTQwCAZmM82eo_0vAvt_zmnPnNLHT5w8,3087
|
40
|
-
aa_bulletin_board/locale/zh_Hans/LC_MESSAGES/django.po,sha256
|
40
|
+
aa_bulletin_board/locale/zh_Hans/LC_MESSAGES/django.po,sha256=-Wfz6_XcMG34QO_E65wsPkxFAtGGtjRDyogJoj5nxbQ,5943
|
41
41
|
aa_bulletin_board/migrations/0001_initial.py,sha256=bmw6yykfLuujYwQ6uR8rGKqcv94UyEa6ZVH34VR5APQ,2620
|
42
42
|
aa_bulletin_board/migrations/0002_alter_bulletin_slug.py,sha256=j6jgInd8CB7cbRU0cKl87GQaWw6ifZercIs5WCWegKw,427
|
43
43
|
aa_bulletin_board/migrations/0003_group_restrictions.py,sha256=zjWr5H8yfdSsJVLbqUUhgSAfrW6A2CVavrlFxfaFZGg,959
|
@@ -60,9 +60,9 @@ aa_bulletin_board/static/aa_bulletin_board/libs/sumoselect/3.4.9/jquery.sumosele
|
|
60
60
|
aa_bulletin_board/static/aa_bulletin_board/libs/sumoselect/3.4.9/sumoselect.css,sha256=owagDaIXi_FGoJjW_UO4J4_I4PFdFQC4WLOYHxgzM04,9828
|
61
61
|
aa_bulletin_board/static/aa_bulletin_board/libs/sumoselect/3.4.9/sumoselect.min.css,sha256=0muqXQE7xbwFLUkp34AfrbvlKi2OPXgKtUgIZOUYqnY,7610
|
62
62
|
aa_bulletin_board/templates/aa_bulletin_board/base.html,sha256=hL8bzygUC-XYcKO7L014DVZZfXpYYUa_yNwC-1ceBPo,887
|
63
|
-
aa_bulletin_board/templates/aa_bulletin_board/bulletin.html,sha256=
|
63
|
+
aa_bulletin_board/templates/aa_bulletin_board/bulletin.html,sha256=h7R_znls5cwKhXVN67Wi9BVyRGmsGofpFEABqXRPmos,1576
|
64
64
|
aa_bulletin_board/templates/aa_bulletin_board/dashboard.html,sha256=LpFK4leA3O17WCu4zilztSFd-tcINbmyzghBKpFXagU,3030
|
65
|
-
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
|
66
66
|
aa_bulletin_board/templates/aa_bulletin_board/bundles/aa-bulletin-board-css.html,sha256=SXtCZlT5p1Kyif0tlw3fEpXdIkRJIYb5uQRfZZjhISk,93
|
67
67
|
aa_bulletin_board/templates/aa_bulletin_board/bundles/aa-bulletin-board-equal-height-js.html,sha256=QxorfVP6JtqqnJFfDL-2QqLsOKuRyq0mXMiV8a86eVo,112
|
68
68
|
aa_bulletin_board/templates/aa_bulletin_board/bundles/aa-bulletin-board-oembed-js.html,sha256=ckHZgj56V71-w9A25IFWFIj1xxONEV8qROrYn1Fy6IE,106
|
@@ -70,20 +70,20 @@ aa_bulletin_board/templates/aa_bulletin_board/bundles/ckeditor5-css.html,sha256=
|
|
70
70
|
aa_bulletin_board/templates/aa_bulletin_board/bundles/ckeditor5-js.html,sha256=329nC3P57jL0yIR65zNUp30zZs9dgZHSYlNbdpQW_a8,68
|
71
71
|
aa_bulletin_board/templates/aa_bulletin_board/bundles/sumoselect-css.html,sha256=bmerkN-g9N1F83GA81JDukVWvX5OHZmeZhhlQawLrlw,104
|
72
72
|
aa_bulletin_board/templates/aa_bulletin_board/bundles/sumoselect-js.html,sha256=8Cm2j6k7NDREcJvLb_RahZ3yFe_IKAFHPnqEETxMCbw,110
|
73
|
-
aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html,sha256=
|
73
|
+
aa_bulletin_board/templates/aa_bulletin_board/partials/common/bulletin-board-management.html,sha256=qXCPB4btoyWvj10b5H-dMpcE13LdnDVwUCPv7ix8Glc,581
|
74
74
|
aa_bulletin_board/templates/aa_bulletin_board/partials/footer/app-translation-footer.html,sha256=nDZPOnsQLBN9meAhxnhd0ynUQIVi3YPzhi47n89zcIg,422
|
75
|
-
aa_bulletin_board/templates/aa_bulletin_board/partials/header/page-header.html,sha256=cE7eVhjS5WUG-x8Kekm1qCdocwHfLDrtc_NsugblFSg,215
|
76
75
|
aa_bulletin_board/templatetags/__init__.py,sha256=sP2D1ovt2gGAPLcGQkByRgXYhvUJ6C52mZMlLIALQ8s,37
|
77
76
|
aa_bulletin_board/templatetags/aa_bulletin_board.py,sha256=tFdJ81gPKpTsTalmXf0rtDJq7po2gDRNcJ3OdfCP73A,2771
|
78
77
|
aa_bulletin_board/tests/__init__.py,sha256=dcMq6O8W1_8NSZobuRedXFQ3o4Zd6Q6Ti7eY-D6JaYI,18
|
79
78
|
aa_bulletin_board/tests/test_access.py,sha256=I2GaJMI4yQWLb0UIOGPdk754B-Rcw0ORXufa8z9-ljU,6874
|
80
79
|
aa_bulletin_board/tests/test_auth_hooks.py,sha256=8BdVYqfrR0dxvBtOBShklmBXA7MCn2VuF-CT4NdV1xg,2386
|
81
|
-
aa_bulletin_board/tests/test_bulletins.py,sha256=
|
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
82
|
aa_bulletin_board/tests/test_settings.py,sha256=dTQn6dH4tS1vY_q32mkkW6DrzLioB2MHUbpYYoj7708,718
|
83
83
|
aa_bulletin_board/tests/test_templatetags.py,sha256=oQ9kG0DEKFMKp9M60zrmxQaHhUYnPflbgRFPg3KpQ2s,3371
|
84
|
-
aa_bulletin_board/tests/test_user_interface.py,sha256=
|
84
|
+
aa_bulletin_board/tests/test_user_interface.py,sha256=yM6jRMlY-dF9-tQzYivZhGfoGyySuhl1SetM1KgYPrM,8511
|
85
85
|
aa_bulletin_board/tests/utils.py,sha256=Dh_jVV7s9Z_OOg_08FxwsZtVU3omrcI260-uQ_Bc_90,2202
|
86
|
-
aa_bulletin_board-2.3.
|
87
|
-
aa_bulletin_board-2.3.
|
88
|
-
aa_bulletin_board-2.3.
|
89
|
-
aa_bulletin_board-2.3.
|
86
|
+
aa_bulletin_board-2.3.4.dist-info/METADATA,sha256=fnF3QZqWVBu_VDELfCnJ20OH8OLHQ5tdEOjSH0ixS1s,58061
|
87
|
+
aa_bulletin_board-2.3.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
88
|
+
aa_bulletin_board-2.3.4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
89
|
+
aa_bulletin_board-2.3.4.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
|