wagtail 6.1.1__py3-none-any.whl → 6.1.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.
- wagtail/__init__.py +1 -1
- wagtail/admin/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/admin/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/fa/LC_MESSAGES/django.po +75 -1
- wagtail/admin/locale/fa/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/fa/LC_MESSAGES/djangojs.po +5 -1
- wagtail/admin/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/fr/LC_MESSAGES/django.po +89 -3
- wagtail/admin/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/is_IS/LC_MESSAGES/django.po +228 -2
- wagtail/admin/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/pt_BR/LC_MESSAGES/django.po +20 -1
- wagtail/admin/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/sk_SK/LC_MESSAGES/django.po +11 -1
- wagtail/admin/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/sl/LC_MESSAGES/django.po +97 -0
- wagtail/admin/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/sv/LC_MESSAGES/django.po +74 -0
- wagtail/admin/locale/sv/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/sv/LC_MESSAGES/djangojs.po +5 -2
- wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.po +71 -1
- wagtail/admin/static/wagtailadmin/js/telepath/widgets.js +1 -1
- wagtail/admin/views/generic/base.py +3 -2
- wagtail/contrib/forms/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/pt_BR/LC_MESSAGES/django.po +2 -2
- wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.po +14 -1
- wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.po +5 -2
- wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.po +6 -2
- wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.po +56 -2
- wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.po +5 -2
- wagtail/contrib/settings/locale/hi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/settings/locale/sk_SK/LC_MESSAGES/django.po +10 -1
- wagtail/contrib/settings/tests/generic/test_admin.py +144 -16
- wagtail/contrib/settings/tests/site_specific/test_admin.py +142 -17
- wagtail/contrib/settings/views.py +3 -0
- wagtail/contrib/simple_translation/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/styleguide/locale/sk_SK/LC_MESSAGES/django.po +5 -1
- wagtail/contrib/styleguide/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/styleguide/locale/zh_Hans/LC_MESSAGES/django.po +3 -0
- wagtail/contrib/styleguide/tests.py +33 -0
- wagtail/contrib/styleguide/views.py +4 -1
- wagtail/contrib/table_block/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/table_block/locale/fr/LC_MESSAGES/django.po +27 -1
- wagtail/contrib/table_block/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/table_block/locale/is_IS/LC_MESSAGES/django.po +28 -2
- wagtail/contrib/table_block/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/table_block/locale/sl/LC_MESSAGES/django.po +27 -1
- wagtail/contrib/typed_table_block/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/typed_table_block/locale/fr/LC_MESSAGES/django.po +12 -1
- wagtail/contrib/typed_table_block/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/typed_table_block/locale/is_IS/LC_MESSAGES/django.po +12 -1
- wagtail/contrib/typed_table_block/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/typed_table_block/locale/sl/LC_MESSAGES/django.po +12 -2
- wagtail/documents/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ca/LC_MESSAGES/django.po +3 -2
- wagtail/documents/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/fa/LC_MESSAGES/django.po +9 -0
- wagtail/documents/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/is_IS/LC_MESSAGES/django.po +17 -2
- wagtail/documents/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/sk_SK/LC_MESSAGES/django.po +45 -2
- wagtail/documents/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/sl/LC_MESSAGES/django.po +11 -2
- wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.po +7 -1
- wagtail/images/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/fa/LC_MESSAGES/django.po +20 -1
- wagtail/images/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/is_IS/LC_MESSAGES/django.po +28 -2
- wagtail/images/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/sk_SK/LC_MESSAGES/django.po +15 -0
- wagtail/images/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/sl/LC_MESSAGES/django.po +14 -2
- wagtail/images/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/sv/LC_MESSAGES/django.po +14 -2
- wagtail/images/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/zh_Hans/LC_MESSAGES/django.po +45 -1
- wagtail/images/models.py +1 -0
- wagtail/images/tests/test_admin_views.py +32 -0
- wagtail/images/tests/test_image_operations.py +12 -0
- wagtail/images/tests/tests.py +27 -2
- wagtail/images/views/images.py +7 -3
- wagtail/images/views/serve.py +1 -0
- wagtail/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/fa/LC_MESSAGES/django.po +3 -0
- wagtail/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/fr/LC_MESSAGES/django.po +23 -4
- wagtail/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/is_IS/LC_MESSAGES/django.po +22 -2
- wagtail/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/sl/LC_MESSAGES/django.po +77 -0
- wagtail/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/sv/LC_MESSAGES/django.po +11 -2
- wagtail/locales/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/locales/locale/it/LC_MESSAGES/django.po +16 -17
- wagtail/search/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/fa/LC_MESSAGES/django.po +24 -0
- wagtail/search/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/pt_BR/LC_MESSAGES/django.po +2 -2
- wagtail/search/tests/test_queries.py +24 -0
- wagtail/search/utils.py +6 -12
- wagtail/snippets/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/fa/LC_MESSAGES/django.po +17 -1
- wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.po +3 -0
- wagtail/snippets/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/zh_Hans/LC_MESSAGES/django.po +40 -1
- wagtail/test/testapp/templates/tests/icons/single-quotes.svg +1 -0
- wagtail/tests/test_blocks.py +27 -0
- wagtail/tests/test_utils.py +28 -1
- wagtail/users/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/fa/LC_MESSAGES/django.po +63 -1
- wagtail/users/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/fr/LC_MESSAGES/django.po +44 -3
- wagtail/users/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/is_IS/LC_MESSAGES/django.po +44 -2
- wagtail/users/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/sk_SK/LC_MESSAGES/django.po +8 -1
- wagtail/users/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/sl/LC_MESSAGES/django.po +46 -2
- wagtail/users/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/sv/LC_MESSAGES/django.po +41 -2
- wagtail/users/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/zh_Hans/LC_MESSAGES/django.po +45 -1
- wagtail/utils/utils.py +26 -0
- wagtail/widget_adapters.py +1 -1
- {wagtail-6.1.1.dist-info → wagtail-6.1.3.dist-info}/METADATA +1 -1
- {wagtail-6.1.1.dist-info → wagtail-6.1.3.dist-info}/RECORD +147 -145
- {wagtail-6.1.1.dist-info → wagtail-6.1.3.dist-info}/LICENSE +0 -0
- {wagtail-6.1.1.dist-info → wagtail-6.1.3.dist-info}/WHEEL +0 -0
- {wagtail-6.1.1.dist-info → wagtail-6.1.3.dist-info}/entry_points.txt +0 -0
- {wagtail-6.1.1.dist-info → wagtail-6.1.3.dist-info}/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
# Translators:
|
|
6
6
|
# Andrej Marsetič, 2022
|
|
7
|
-
# Andrej Marsetič, 2022-
|
|
7
|
+
# Andrej Marsetič, 2022-2024
|
|
8
8
|
# Mitja Pagon <mitja.pagon@inueni.com>, 2016
|
|
9
9
|
msgid ""
|
|
10
10
|
msgstr ""
|
|
@@ -12,7 +12,7 @@ msgstr ""
|
|
|
12
12
|
"Report-Msgid-Bugs-To: \n"
|
|
13
13
|
"POT-Creation-Date: 2024-05-02 10:04+0100\n"
|
|
14
14
|
"PO-Revision-Date: 2015-08-26 14:04+0000\n"
|
|
15
|
-
"Last-Translator: Andrej Marsetič, 2022-
|
|
15
|
+
"Last-Translator: Andrej Marsetič, 2022-2024\n"
|
|
16
16
|
"Language-Team: Slovenian (http://app.transifex.com/torchbox/wagtail/language/"
|
|
17
17
|
"sl/)\n"
|
|
18
18
|
"MIME-Version: 1.0\n"
|
|
@@ -38,15 +38,37 @@ msgstr ""
|
|
|
38
38
|
msgid "Please specify at least one recommendation for this search term."
|
|
39
39
|
msgstr "Prosim določite vsaj eno priporočilo za ta iskalni niz"
|
|
40
40
|
|
|
41
|
+
msgid "You must enter an external link text if you enter an external link URL."
|
|
42
|
+
msgstr ""
|
|
43
|
+
"Če vnesete URL zunanje povezave, morate vnesti besedilo zunanje povezave."
|
|
44
|
+
|
|
45
|
+
msgid "You must recommend a page OR an external link."
|
|
46
|
+
msgstr "Priporočiti morate stran ALI zunanjo povezavo."
|
|
47
|
+
|
|
48
|
+
msgid "Please only select a page OR enter an external link."
|
|
49
|
+
msgstr "Izberite samo stran ALI vnesite zunanjo povezavo."
|
|
50
|
+
|
|
41
51
|
msgid "Query Daily Hits"
|
|
42
52
|
msgstr "Dnevni zadetki za iskalni niz"
|
|
43
53
|
|
|
44
54
|
msgid "page"
|
|
45
55
|
msgstr "stran"
|
|
46
56
|
|
|
57
|
+
msgid "Choose an internal page for this promotion"
|
|
58
|
+
msgstr "Izberite notranjo stran za to promocijo"
|
|
59
|
+
|
|
60
|
+
msgid "External link URL"
|
|
61
|
+
msgstr "URL zunanje povezave"
|
|
62
|
+
|
|
63
|
+
msgid "Alternatively, use an external link for this promotion"
|
|
64
|
+
msgstr "Za to promocijo lahko uporabite tudi zunanjo povezavo"
|
|
65
|
+
|
|
47
66
|
msgid "description"
|
|
48
67
|
msgstr "opis"
|
|
49
68
|
|
|
69
|
+
msgid "Applies to internal page or external link"
|
|
70
|
+
msgstr "Velja za notranjo stran ali zunanjo povezavo"
|
|
71
|
+
|
|
50
72
|
msgid "search promotion"
|
|
51
73
|
msgstr "promoviran rezultat"
|
|
52
74
|
|
|
@@ -56,6 +78,29 @@ msgstr "Dodaj promoviran rezultat"
|
|
|
56
78
|
msgid "Add search pick"
|
|
57
79
|
msgstr "Dodaj promoviran rezultat"
|
|
58
80
|
|
|
81
|
+
msgid ""
|
|
82
|
+
"<p>Promoted search results are a means of recommending specific pages or "
|
|
83
|
+
"external links that might not organically come high up in search results. E."
|
|
84
|
+
"g recommending your primary donation page to a user searching with the less "
|
|
85
|
+
"common term \"<em>giving</em>\".</p>"
|
|
86
|
+
msgstr ""
|
|
87
|
+
"<p>Promovirani rezultati iskanja so način priporočanja določenih strani ali "
|
|
88
|
+
"zunanjih povezav, ki morda niso organsko visoko v rezultatih iskanja. Npr. "
|
|
89
|
+
"priporočanje vaše primarne strani za donacije uporabniku, ki išče z manj "
|
|
90
|
+
"pogostim izrazom \"<em>darovanje</em>\".</p>"
|
|
91
|
+
|
|
92
|
+
msgid ""
|
|
93
|
+
"<p>The \"Search term(s)/phrase\" field below must contain the full and exact "
|
|
94
|
+
"search for which you wish to provide recommended results, <em>including</em> "
|
|
95
|
+
"any misspellings/user error. To help, you can choose from search terms that "
|
|
96
|
+
"have been popular with users of your site.</p>"
|
|
97
|
+
msgstr ""
|
|
98
|
+
"<p>Spodnje polje \"Iskalni izraz(-i)/besedna zveza\" mora vsebovati celotno "
|
|
99
|
+
"in natančno iskanje, za katero želite zagotoviti priporočene rezultate, "
|
|
100
|
+
"<em>vključno</em> z morebitnimi pravopisnimi napakami/uporabniško napako. V "
|
|
101
|
+
"pomoč si lahko izberete iskalne izraze, ki so bili priljubljeni pri "
|
|
102
|
+
"uporabnikih vašega spletnega mesta.</p>"
|
|
103
|
+
|
|
59
104
|
msgid "Save"
|
|
60
105
|
msgstr "Shrani"
|
|
61
106
|
|
|
@@ -88,9 +133,15 @@ msgstr "Premakni gor"
|
|
|
88
133
|
msgid "Move down"
|
|
89
134
|
msgstr "Premakni navzdol"
|
|
90
135
|
|
|
136
|
+
msgid "Recommended search result"
|
|
137
|
+
msgstr "Priporočeni rezultat iskanja"
|
|
138
|
+
|
|
91
139
|
msgid "Promoted search results"
|
|
92
140
|
msgstr "Promovirani rezultati iskanja"
|
|
93
141
|
|
|
142
|
+
msgid "Add a recommended result"
|
|
143
|
+
msgstr "Dodajanje priporočenega rezultata"
|
|
144
|
+
|
|
94
145
|
#, python-format
|
|
95
146
|
msgid "Sorry, no promoted results match \"<em>%(query_string)s</em>\""
|
|
96
147
|
msgstr ""
|
|
@@ -105,6 +156,9 @@ msgstr ""
|
|
|
105
156
|
"Dodan ni še noben promoviran rezultat. Zakaj ga ne bi a "
|
|
106
157
|
"href=\"%(wagtailsearchpromotions_add_url)s\">dodali</a>"
|
|
107
158
|
|
|
159
|
+
msgid "No promoted results have been created."
|
|
160
|
+
msgstr "Ni bil ustvarjen noben promoviran rezultat."
|
|
161
|
+
|
|
108
162
|
msgid "Popular search terms"
|
|
109
163
|
msgstr "Priljubljeni iskalni nizi"
|
|
110
164
|
|
|
Binary file
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
# Translators:
|
|
6
6
|
# Jim Brouzoulis <jim.brouzoulis@chalmers.se>, 2017
|
|
7
|
-
# Martin Sandström <martin@marteinn.se>, 2020
|
|
7
|
+
# Martin Sandström <martin@marteinn.se>, 2020,2024
|
|
8
8
|
# Philip Andersen <renegadevi@codeofmagi.net>, 2018
|
|
9
9
|
# Thomas Kunambi <kunambi@gmail.com>, 2016,2022
|
|
10
10
|
msgid ""
|
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
|
13
13
|
"Report-Msgid-Bugs-To: \n"
|
|
14
14
|
"POT-Creation-Date: 2024-05-02 10:04+0100\n"
|
|
15
15
|
"PO-Revision-Date: 2015-08-26 14:04+0000\n"
|
|
16
|
-
"Last-Translator:
|
|
16
|
+
"Last-Translator: Martin Sandström <martin@marteinn.se>, 2020,2024\n"
|
|
17
17
|
"Language-Team: Swedish (http://app.transifex.com/torchbox/wagtail/language/"
|
|
18
18
|
"sv/)\n"
|
|
19
19
|
"MIME-Version: 1.0\n"
|
|
@@ -44,6 +44,9 @@ msgstr "Dagliga träffar för sökterm"
|
|
|
44
44
|
msgid "page"
|
|
45
45
|
msgstr "sida"
|
|
46
46
|
|
|
47
|
+
msgid "External link URL"
|
|
48
|
+
msgstr "Extern länk URL"
|
|
49
|
+
|
|
47
50
|
msgid "description"
|
|
48
51
|
msgstr "beskrivning"
|
|
49
52
|
|
|
@@ -10,7 +10,7 @@ msgid ""
|
|
|
10
10
|
msgstr ""
|
|
11
11
|
"Project-Id-Version: Wagtail\n"
|
|
12
12
|
"Report-Msgid-Bugs-To: \n"
|
|
13
|
-
"POT-Creation-Date: 2024-
|
|
13
|
+
"POT-Creation-Date: 2024-05-02 10:04+0100\n"
|
|
14
14
|
"PO-Revision-Date: 2016-03-01 19:20+0000\n"
|
|
15
15
|
"Last-Translator: priyanshu kumar, 2023\n"
|
|
16
16
|
"Language-Team: Hindi (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# Fabio Santos <f4bio.sa@gmail.com>, 2023
|
|
7
7
|
# Luiz Boaretto <lboaretto@gmail.com>, 2016
|
|
8
8
|
# Luiz Boaretto <lboaretto@gmail.com>, 2016,2018-2020
|
|
9
|
-
# Rodrigo de Almeida Sottomaior Macedo <sottomaiormacedotec@
|
|
9
|
+
# Rodrigo de Almeida Sottomaior Macedo <sottomaiormacedotec@sottomaiormacedo.tech>, 2022
|
|
10
10
|
msgid ""
|
|
11
11
|
msgstr ""
|
|
12
12
|
"Project-Id-Version: Wagtail\n"
|
|
Binary file
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# This file is distributed under the same license as the PACKAGE package.
|
|
4
4
|
#
|
|
5
5
|
# Translators:
|
|
6
|
+
# Ivan Waginger <ivan.waginger@gmail.com>, 2024
|
|
6
7
|
# Jozef Gáborík <hi@jozo.io>, 2020
|
|
7
8
|
# karabellyj <jozefkarabelly@gmail.com>, 2017
|
|
8
9
|
# karabellyj <jozefkarabelly@gmail.com>, 2017
|
|
@@ -14,7 +15,7 @@ msgstr ""
|
|
|
14
15
|
"Report-Msgid-Bugs-To: \n"
|
|
15
16
|
"POT-Creation-Date: 2024-05-02 10:04+0100\n"
|
|
16
17
|
"PO-Revision-Date: 2016-03-01 19:20+0000\n"
|
|
17
|
-
"Last-Translator:
|
|
18
|
+
"Last-Translator: Ivan Waginger <ivan.waginger@gmail.com>, 2024\n"
|
|
18
19
|
"Language-Team: Slovak (Slovakia) (http://app.transifex.com/torchbox/wagtail/"
|
|
19
20
|
"language/sk_SK/)\n"
|
|
20
21
|
"MIME-Version: 1.0\n"
|
|
@@ -27,6 +28,10 @@ msgstr ""
|
|
|
27
28
|
msgid "default"
|
|
28
29
|
msgstr "predvolené"
|
|
29
30
|
|
|
31
|
+
#, python-format
|
|
32
|
+
msgid "%(site_setting)s for %(site)s"
|
|
33
|
+
msgstr "%(site_setting)s pre %(site)s"
|
|
34
|
+
|
|
30
35
|
msgid "Site"
|
|
31
36
|
msgstr "Sídlo"
|
|
32
37
|
|
|
@@ -41,3 +46,7 @@ msgstr "Nastavenia"
|
|
|
41
46
|
|
|
42
47
|
msgid "The setting could not be saved due to errors."
|
|
43
48
|
msgstr "Nastavenia neboli uložené kvôli chybám."
|
|
49
|
+
|
|
50
|
+
#, python-format
|
|
51
|
+
msgid "%(setting_type)s updated."
|
|
52
|
+
msgstr "%(setting_type)s aktualizované."
|
|
@@ -77,11 +77,6 @@ class BaseTestGenericSettingView(WagtailTestUtils, TestCase):
|
|
|
77
77
|
class TestGenericSettingCreateView(BaseTestGenericSettingView):
|
|
78
78
|
def setUp(self):
|
|
79
79
|
self.user = self.login()
|
|
80
|
-
self.user.user_permissions.add(
|
|
81
|
-
Permission.objects.get(
|
|
82
|
-
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
83
|
-
)
|
|
84
|
-
)
|
|
85
80
|
|
|
86
81
|
def test_get_edit(self):
|
|
87
82
|
response = self.get()
|
|
@@ -113,11 +108,62 @@ class TestGenericSettingCreateView(BaseTestGenericSettingView):
|
|
|
113
108
|
# Ensure the form supports file uploads
|
|
114
109
|
self.assertContains(response, 'enctype="multipart/form-data"')
|
|
115
110
|
|
|
116
|
-
def
|
|
111
|
+
def test_create_restricted_field_without_any_permission(self):
|
|
112
|
+
# User has no permissions over the setting model, only access to the admin
|
|
117
113
|
self.user.is_superuser = False
|
|
118
114
|
self.user.save()
|
|
115
|
+
self.user.user_permissions.add(
|
|
116
|
+
Permission.objects.get(
|
|
117
|
+
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
118
|
+
),
|
|
119
|
+
)
|
|
119
120
|
|
|
120
121
|
self.assertFalse(TestPermissionedGenericSetting.objects.exists())
|
|
122
|
+
# GET should redirect away with permission denied
|
|
123
|
+
response = self.get(setting=TestPermissionedGenericSetting)
|
|
124
|
+
self.assertRedirects(response, status_code=302, expected_url="/admin/")
|
|
125
|
+
|
|
126
|
+
# the GET might create a setting object, depending on when the permission check is done,
|
|
127
|
+
# so remove any created objects prior to testing the POST
|
|
128
|
+
TestPermissionedGenericSetting.objects.all().delete()
|
|
129
|
+
|
|
130
|
+
# POST should redirect away with permission denied
|
|
131
|
+
response = self.post(
|
|
132
|
+
post_data={"sensitive_email": "test@example.com", "title": "test"},
|
|
133
|
+
setting=TestPermissionedGenericSetting,
|
|
134
|
+
)
|
|
135
|
+
self.assertRedirects(response, status_code=302, expected_url="/admin/")
|
|
136
|
+
|
|
137
|
+
# The retrieved setting should contain none of the submitted data
|
|
138
|
+
setting = TestPermissionedGenericSetting.load()
|
|
139
|
+
self.assertEqual(setting.title, "")
|
|
140
|
+
self.assertEqual(setting.sensitive_email, "")
|
|
141
|
+
|
|
142
|
+
def test_create_restricted_field_without_field_permission(self):
|
|
143
|
+
# User has edit permission over the setting model, but not the sensitive_email field
|
|
144
|
+
self.user.is_superuser = False
|
|
145
|
+
self.user.save()
|
|
146
|
+
self.user.user_permissions.add(
|
|
147
|
+
Permission.objects.get(
|
|
148
|
+
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
149
|
+
),
|
|
150
|
+
Permission.objects.get(
|
|
151
|
+
content_type__app_label="tests",
|
|
152
|
+
codename="change_testpermissionedgenericsetting",
|
|
153
|
+
),
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
self.assertFalse(TestPermissionedGenericSetting.objects.exists())
|
|
157
|
+
# GET should provide a form with title but not sensitive_email
|
|
158
|
+
response = self.get(setting=TestPermissionedGenericSetting)
|
|
159
|
+
self.assertEqual(response.status_code, 200)
|
|
160
|
+
self.assertIn("title", list(response.context["form"].fields))
|
|
161
|
+
self.assertNotIn("sensitive_email", list(response.context["form"].fields))
|
|
162
|
+
|
|
163
|
+
# the GET creates a setting object, so remove any created objects prior to testing the POST
|
|
164
|
+
TestPermissionedGenericSetting.objects.all().delete()
|
|
165
|
+
|
|
166
|
+
# POST should allow the title to be set, but not the sensitive_email
|
|
121
167
|
response = self.post(
|
|
122
168
|
post_data={"sensitive_email": "test@example.com", "title": "test"},
|
|
123
169
|
setting=TestPermissionedGenericSetting,
|
|
@@ -129,11 +175,31 @@ class TestGenericSettingCreateView(BaseTestGenericSettingView):
|
|
|
129
175
|
self.assertEqual(settings.sensitive_email, "")
|
|
130
176
|
|
|
131
177
|
def test_create_restricted_field(self):
|
|
178
|
+
# User has edit permission over the setting model, including the sensitive_email field
|
|
132
179
|
self.user.is_superuser = False
|
|
133
180
|
self.user.save()
|
|
134
181
|
self.user.user_permissions.add(
|
|
135
|
-
Permission.objects.get(
|
|
182
|
+
Permission.objects.get(
|
|
183
|
+
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
184
|
+
),
|
|
185
|
+
Permission.objects.get(
|
|
186
|
+
content_type__app_label="tests",
|
|
187
|
+
codename="change_testpermissionedgenericsetting",
|
|
188
|
+
),
|
|
189
|
+
Permission.objects.get(codename="can_edit_sensitive_email_generic_setting"),
|
|
136
190
|
)
|
|
191
|
+
|
|
192
|
+
self.assertFalse(TestPermissionedGenericSetting.objects.exists())
|
|
193
|
+
# GET should provide a form with title and sensitive_email
|
|
194
|
+
response = self.get(setting=TestPermissionedGenericSetting)
|
|
195
|
+
self.assertEqual(response.status_code, 200)
|
|
196
|
+
self.assertIn("title", list(response.context["form"].fields))
|
|
197
|
+
self.assertIn("sensitive_email", list(response.context["form"].fields))
|
|
198
|
+
|
|
199
|
+
# the GET creates a setting object, so remove any created objects prior to testing the POST
|
|
200
|
+
TestPermissionedGenericSetting.objects.all().delete()
|
|
201
|
+
|
|
202
|
+
# POST should allow both title and sensitive_email to be set
|
|
137
203
|
self.assertFalse(TestPermissionedGenericSetting.objects.exists())
|
|
138
204
|
response = self.post(
|
|
139
205
|
post_data={"sensitive_email": "test@example.com", "title": "test"},
|
|
@@ -153,11 +219,6 @@ class TestGenericSettingEditView(BaseTestGenericSettingView):
|
|
|
153
219
|
self.test_setting.save()
|
|
154
220
|
|
|
155
221
|
self.user = self.login()
|
|
156
|
-
self.user.user_permissions.add(
|
|
157
|
-
Permission.objects.get(
|
|
158
|
-
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
159
|
-
)
|
|
160
|
-
)
|
|
161
222
|
|
|
162
223
|
def test_get_edit(self):
|
|
163
224
|
response = self.get()
|
|
@@ -206,48 +267,115 @@ class TestGenericSettingEditView(BaseTestGenericSettingView):
|
|
|
206
267
|
)
|
|
207
268
|
|
|
208
269
|
def test_edit_restricted_field(self):
|
|
270
|
+
# User has edit permission over the setting model, including the sensitive_email field
|
|
209
271
|
test_setting = TestPermissionedGenericSetting()
|
|
210
272
|
test_setting.sensitive_email = "test@example.com"
|
|
273
|
+
test_setting.title = "Old title"
|
|
211
274
|
test_setting.save()
|
|
212
275
|
self.user.is_superuser = False
|
|
213
276
|
self.user.save()
|
|
214
277
|
|
|
215
278
|
self.user.user_permissions.add(
|
|
216
|
-
Permission.objects.get(
|
|
279
|
+
Permission.objects.get(
|
|
280
|
+
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
281
|
+
),
|
|
282
|
+
Permission.objects.get(
|
|
283
|
+
content_type__app_label="tests",
|
|
284
|
+
codename="change_testpermissionedgenericsetting",
|
|
285
|
+
),
|
|
286
|
+
Permission.objects.get(codename="can_edit_sensitive_email_generic_setting"),
|
|
217
287
|
)
|
|
218
288
|
|
|
289
|
+
# GET should provide a form with title and sensitive_email
|
|
219
290
|
response = self.get(setting=TestPermissionedGenericSetting)
|
|
220
291
|
self.assertEqual(response.status_code, 200)
|
|
292
|
+
self.assertIn("title", list(response.context["form"].fields))
|
|
221
293
|
self.assertIn("sensitive_email", list(response.context["form"].fields))
|
|
222
294
|
|
|
295
|
+
# POST should allow both title and sensitive_email to be set
|
|
223
296
|
response = self.post(
|
|
224
297
|
setting=TestPermissionedGenericSetting,
|
|
225
|
-
post_data={
|
|
298
|
+
post_data={
|
|
299
|
+
"sensitive_email": "test-updated@example.com",
|
|
300
|
+
"title": "New title",
|
|
301
|
+
},
|
|
226
302
|
)
|
|
227
303
|
self.assertEqual(response.status_code, 302)
|
|
228
304
|
|
|
229
305
|
test_setting.refresh_from_db()
|
|
230
306
|
self.assertEqual(test_setting.sensitive_email, "test-updated@example.com")
|
|
307
|
+
self.assertEqual(test_setting.title, "New title")
|
|
231
308
|
|
|
232
|
-
def
|
|
309
|
+
def test_edit_restricted_field_without_field_permission(self):
|
|
310
|
+
# User has edit permission over the setting model, but not the sensitive_email field
|
|
233
311
|
test_setting = TestPermissionedGenericSetting()
|
|
234
312
|
test_setting.sensitive_email = "test@example.com"
|
|
313
|
+
test_setting.title = "Old title"
|
|
235
314
|
test_setting.save()
|
|
236
315
|
self.user.is_superuser = False
|
|
237
316
|
self.user.save()
|
|
317
|
+
self.user.user_permissions.add(
|
|
318
|
+
Permission.objects.get(
|
|
319
|
+
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
320
|
+
),
|
|
321
|
+
Permission.objects.get(
|
|
322
|
+
content_type__app_label="tests",
|
|
323
|
+
codename="change_testpermissionedgenericsetting",
|
|
324
|
+
),
|
|
325
|
+
)
|
|
238
326
|
|
|
327
|
+
# GET should provide a form with title but not sensitive_email
|
|
239
328
|
response = self.get(setting=TestPermissionedGenericSetting)
|
|
240
329
|
self.assertEqual(response.status_code, 200)
|
|
330
|
+
self.assertIn("title", list(response.context["form"].fields))
|
|
241
331
|
self.assertNotIn("sensitive_email", list(response.context["form"].fields))
|
|
242
332
|
|
|
333
|
+
# POST should allow the title to be set, but not the sensitive_email
|
|
243
334
|
response = self.post(
|
|
244
335
|
setting=TestPermissionedGenericSetting,
|
|
245
|
-
post_data={
|
|
336
|
+
post_data={
|
|
337
|
+
"sensitive_email": "test-updated@example.com",
|
|
338
|
+
"title": "New title",
|
|
339
|
+
},
|
|
246
340
|
)
|
|
247
341
|
self.assertEqual(response.status_code, 302)
|
|
248
342
|
|
|
249
343
|
test_setting.refresh_from_db()
|
|
250
344
|
self.assertEqual(test_setting.sensitive_email, "test@example.com")
|
|
345
|
+
self.assertEqual(test_setting.title, "New title")
|
|
346
|
+
|
|
347
|
+
def test_edit_restricted_field_without_any_permission(self):
|
|
348
|
+
# User has no permissions over the setting model, only access to the admin
|
|
349
|
+
test_setting = TestPermissionedGenericSetting()
|
|
350
|
+
test_setting.sensitive_email = "test@example.com"
|
|
351
|
+
test_setting.title = "Old title"
|
|
352
|
+
test_setting.save()
|
|
353
|
+
self.user.is_superuser = False
|
|
354
|
+
self.user.save()
|
|
355
|
+
self.user.user_permissions.add(
|
|
356
|
+
Permission.objects.get(
|
|
357
|
+
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
358
|
+
),
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
# GET should redirect away with permission denied
|
|
362
|
+
response = self.get(setting=TestPermissionedGenericSetting)
|
|
363
|
+
self.assertRedirects(response, status_code=302, expected_url="/admin/")
|
|
364
|
+
|
|
365
|
+
# POST should redirect away with permission denied
|
|
366
|
+
response = self.post(
|
|
367
|
+
setting=TestPermissionedGenericSetting,
|
|
368
|
+
post_data={
|
|
369
|
+
"sensitive_email": "test-updated@example.com",
|
|
370
|
+
"title": "new title",
|
|
371
|
+
},
|
|
372
|
+
)
|
|
373
|
+
self.assertRedirects(response, status_code=302, expected_url="/admin/")
|
|
374
|
+
|
|
375
|
+
# The retrieved setting should be unchanged
|
|
376
|
+
test_setting.refresh_from_db()
|
|
377
|
+
self.assertEqual(test_setting.sensitive_email, "test@example.com")
|
|
378
|
+
self.assertEqual(test_setting.title, "Old title")
|
|
251
379
|
|
|
252
380
|
|
|
253
381
|
class TestAdminPermission(WagtailTestUtils, TestCase):
|