wagtail-cjkcms 25.1.4__py2.py3-none-any.whl → 25.1.5__py2.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.
- cjkcms/__init__.py +1 -1
- cjkcms/models/admin_sidebar.py +0 -31
- cjkcms/templatetags/cjkcms_tags.py +18 -0
- cjkcms/wagtail_hooks.py +37 -5
- {wagtail_cjkcms-25.1.4.dist-info → wagtail_cjkcms-25.1.5.dist-info}/METADATA +2 -2
- {wagtail_cjkcms-25.1.4.dist-info → wagtail_cjkcms-25.1.5.dist-info}/RECORD +10 -20
- {wagtail_cjkcms-25.1.4.dist-info → wagtail_cjkcms-25.1.5.dist-info}/WHEEL +1 -1
- cjkcms/.DS_Store +0 -0
- cjkcms/static/.DS_Store +0 -0
- cjkcms/static/vendor/.DS_Store +0 -0
- cjkcms/static/vendor/mdb/.DS_Store +0 -0
- cjkcms/static/vendor/mdb/css/.DS_Store +0 -0
- cjkcms/static/vendor/mdb/js/.DS_Store +0 -0
- cjkcms/templates/.DS_Store +0 -0
- cjkcms/templates/cjkcms/.DS_Store +0 -0
- cjkcms/tests/media/images/test_O3GLriA.original.png +0 -0
- cjkcms/tests/media/original_images/test_O3GLriA.png +0 -0
- {wagtail_cjkcms-25.1.4.dist-info → wagtail_cjkcms-25.1.5.dist-info}/LICENSE +0 -0
- {wagtail_cjkcms-25.1.4.dist-info → wagtail_cjkcms-25.1.5.dist-info}/entry_points.txt +0 -0
- {wagtail_cjkcms-25.1.4.dist-info → wagtail_cjkcms-25.1.5.dist-info}/top_level.txt +0 -0
cjkcms/__init__.py
CHANGED
cjkcms/models/admin_sidebar.py
CHANGED
@@ -1,31 +0,0 @@
|
|
1
|
-
from .snippet_models import Navbar, NavbarForm, EventCalendar
|
2
|
-
from wagtail.snippets.views.snippets import SnippetViewSet
|
3
|
-
|
4
|
-
|
5
|
-
class NavbarSnippet(SnippetViewSet):
|
6
|
-
model = Navbar
|
7
|
-
menu_label = "Navigation"
|
8
|
-
menu_icon = "link" # change as required
|
9
|
-
add_to_admin_menu = True
|
10
|
-
list_display = (
|
11
|
-
"name",
|
12
|
-
"custom_css_class",
|
13
|
-
"custom_id",
|
14
|
-
)
|
15
|
-
search_fields = [
|
16
|
-
"name",
|
17
|
-
]
|
18
|
-
|
19
|
-
def get_form_class(self, for_update=False):
|
20
|
-
return NavbarForm
|
21
|
-
|
22
|
-
|
23
|
-
class EventCalendarSnippet(SnippetViewSet):
|
24
|
-
model = EventCalendar
|
25
|
-
menu_label = "Public Events"
|
26
|
-
menu_icon = "calendar" # change as required
|
27
|
-
# add_to_admin_menu = True
|
28
|
-
list_display = ("name",)
|
29
|
-
search_fields = [
|
30
|
-
"name",
|
31
|
-
]
|
@@ -159,6 +159,11 @@ def get_navbar_css(context):
|
|
159
159
|
|
160
160
|
@register.simple_tag(takes_context=True)
|
161
161
|
def get_navbars(context) -> "QuerySet[Navbar]":
|
162
|
+
"""Returns all Navbar objects that are associated with the current site layout
|
163
|
+
|
164
|
+
Returns:
|
165
|
+
QuerySet[Navbar]: _description_
|
166
|
+
"""
|
162
167
|
layout = LayoutSettings.for_request(context["request"])
|
163
168
|
navbarorderables = layout.site_navbar.all()
|
164
169
|
return Navbar.objects.filter(navbarorderable__in=navbarorderables).order_by(
|
@@ -166,6 +171,19 @@ def get_navbars(context) -> "QuerySet[Navbar]":
|
|
166
171
|
)
|
167
172
|
|
168
173
|
|
174
|
+
@register.simple_tag(takes_context=True)
|
175
|
+
def get_navbar(context, navbar_id) -> "Navbar":
|
176
|
+
"""Returns the Navbar object with the given custom_id
|
177
|
+
|
178
|
+
Args:
|
179
|
+
custom_id: Custom_id of the Navbar defined in its settings
|
180
|
+
|
181
|
+
Returns:
|
182
|
+
Navbar: The Navbar object with the given id
|
183
|
+
"""
|
184
|
+
return Navbar.objects.get(custom_id=navbar_id)
|
185
|
+
|
186
|
+
|
169
187
|
@register.simple_tag(takes_context=True)
|
170
188
|
def get_footers(context) -> "QuerySet[Footer]":
|
171
189
|
layout = LayoutSettings.for_request(context["request"])
|
cjkcms/wagtail_hooks.py
CHANGED
@@ -7,7 +7,7 @@ from cjkcms.draftail import (
|
|
7
7
|
register_inline_styling,
|
8
8
|
)
|
9
9
|
|
10
|
-
from cjkcms.models.admin_sidebar import NavbarSnippet, EventCalendarSnippet
|
10
|
+
# from cjkcms.models.admin_sidebar import NavbarSnippet, EventCalendarSnippet
|
11
11
|
from django.http.response import HttpResponse
|
12
12
|
from django.templatetags.static import static
|
13
13
|
from django.utils.html import format_html
|
@@ -16,6 +16,42 @@ from wagtail.admin.menu import MenuItem
|
|
16
16
|
from wagtail.snippets.models import register_snippet
|
17
17
|
from wagtailcache.cache import clear_cache
|
18
18
|
|
19
|
+
from cjkcms.models.snippet_models import Navbar, NavbarForm, EventCalendar
|
20
|
+
from wagtail.snippets.views.snippets import SnippetViewSet
|
21
|
+
|
22
|
+
|
23
|
+
class NavbarSnippet(SnippetViewSet):
|
24
|
+
model = Navbar
|
25
|
+
menu_label = "Navigation"
|
26
|
+
menu_icon = "link" # change as required
|
27
|
+
add_to_admin_menu = True
|
28
|
+
list_display = (
|
29
|
+
"name",
|
30
|
+
"custom_css_class",
|
31
|
+
"custom_id",
|
32
|
+
)
|
33
|
+
search_fields = [
|
34
|
+
"name",
|
35
|
+
]
|
36
|
+
|
37
|
+
def get_form_class(self, for_update=False):
|
38
|
+
return NavbarForm
|
39
|
+
|
40
|
+
|
41
|
+
class EventCalendarSnippet(SnippetViewSet):
|
42
|
+
model = EventCalendar
|
43
|
+
menu_label = "Public Events"
|
44
|
+
menu_icon = "calendar" # change as required
|
45
|
+
# add_to_admin_menu = True
|
46
|
+
list_display = ("name",)
|
47
|
+
search_fields = [
|
48
|
+
"name",
|
49
|
+
]
|
50
|
+
|
51
|
+
|
52
|
+
register_snippet(NavbarSnippet)
|
53
|
+
register_snippet(EventCalendarSnippet)
|
54
|
+
|
19
55
|
|
20
56
|
@hooks.register("insert_global_admin_css") # type: ignore
|
21
57
|
def global_admin_css():
|
@@ -196,7 +232,3 @@ def register_align_right_feature(features):
|
|
196
232
|
@hooks.register("register_rich_text_features") # type: ignore
|
197
233
|
def register_external_link(features):
|
198
234
|
features.register_link_type(NewWindowExternalLinkHandler)
|
199
|
-
|
200
|
-
|
201
|
-
register_snippet(NavbarSnippet)
|
202
|
-
register_snippet(EventCalendarSnippet)
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: wagtail-cjkcms
|
3
|
-
Version: 25.1.
|
3
|
+
Version: 25.1.5
|
4
4
|
Summary: Wagtail Content Management System, installable as a Django app into any Wagtail 4.1.x/5.x/6.x site.
|
5
5
|
Author-email: Grzegorz Krol <gk@cjk.pl>
|
6
6
|
License: BSD-3-Clause
|
@@ -1,5 +1,4 @@
|
|
1
|
-
cjkcms
|
2
|
-
cjkcms/__init__.py,sha256=kRHKAkMoAh5VCWZN6VWdq8hw9O1Jk6houfZWfKsHwAk,272
|
1
|
+
cjkcms/__init__.py,sha256=OYSMMDfXv2lnX0PKb9z2ijZfOhIA0JzFyIxcO0tuJvk,272
|
3
2
|
cjkcms/apps.py,sha256=VA5Z1YerImetvN8KsjPTMSn1fSo6O1JkBJdK5y5ubJY,173
|
4
3
|
cjkcms/fields.py,sha256=dE0DuNIjX7jhA-5GjSmR2l66EDH2kq3vuxL9WyRALCY,3191
|
5
4
|
cjkcms/forms.py,sha256=_uu_FR8odz40lD-Rmw0tlK7-xxxa8THHfV2-1ZJYsIM,361
|
@@ -9,7 +8,7 @@ cjkcms/settings.py,sha256=zw8V6cMP57w-U0M5hU4a1ouRLn-q02Waip7KnTZfbpc,20109
|
|
9
8
|
cjkcms/urls.py,sha256=k5tEHWI4Umi2PWvGdNJ-FZ9OCy6AS3Y2S7k5jNOpgt0,644
|
10
9
|
cjkcms/utils.py,sha256=u4pkPxAwqH3SgyIcmvk7I5L3w-eIcz0Rphmv0Y1DRpA,2006
|
11
10
|
cjkcms/views.py,sha256=NWy3pBBcLUOH6WjEJh03N2sND4oToiyiy6_spgXdUcY,4389
|
12
|
-
cjkcms/wagtail_hooks.py,sha256=
|
11
|
+
cjkcms/wagtail_hooks.py,sha256=emfgvVN4pkUuBjvHl1mMZz8zXq3CCqAw3BlufrK4S9k,7311
|
13
12
|
cjkcms/widgets.py,sha256=2B92WkaktZC1ge4GrAMTB7VVYKnKR8qoZLAtWS2z_00,1745
|
14
13
|
cjkcms/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
14
|
cjkcms/api/mailchimp.py,sha256=pufnnu8n-c6kkWNKy-EsRLW5LLBn8_TmYrnRSQCPFdY,2832
|
@@ -59,7 +58,7 @@ cjkcms/migrations/0022_cjkcmspage_breadcrumb_label_and_more.py,sha256=UqXcsDPMsJ
|
|
59
58
|
cjkcms/migrations/0023_alter_navbar_language.py,sha256=TnMs5fzf-PmirNn6CgYh5pUwwHhaYKPDCjqnZqrj8Ok,547
|
60
59
|
cjkcms/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
61
60
|
cjkcms/models/__init__.py,sha256=f99GmxfFxGtQl8JvZFz8rAtklCIesLoSccyhhi2xgPU,232
|
62
|
-
cjkcms/models/admin_sidebar.py,sha256=
|
61
|
+
cjkcms/models/admin_sidebar.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
63
62
|
cjkcms/models/cms_models.py,sha256=9U46xwPidQfUlXnuVUW5IbtphXX_8djJD4CohoP3NbU,2356
|
64
63
|
cjkcms/models/integration_models.py,sha256=L29OBwLH8DfHtDplu218UGbbvL94Erk3J_R7n365zQM,6302
|
65
64
|
cjkcms/models/page_models.py,sha256=-9SLMKA5KI2gMMOTaAtpr4pE2RhidilaRRzF7nnE0WI,25454
|
@@ -141,7 +140,6 @@ cjkcms/project_template/webpack/project_name/static/js/devsite.js,sha256=47DEQpj
|
|
141
140
|
cjkcms/project_template/webpack/search/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
142
141
|
cjkcms/project_template/webpack/search/views.py,sha256=Q_g-24nZPUYoL9pmo5u7PfLGL95jlUT2Ow7Vpm1bjZU,1019
|
143
142
|
cjkcms/project_template/webpack/search/templates/search/search.html,sha256=acn2R_BiiOcuh3FPNkRliCcZzh28z1Ha-0QbL-w-cWY,1097
|
144
|
-
cjkcms/static/.DS_Store,sha256=RizEDsCuvmQz4WVPsXHIhD32-b3g1CDF0W6pR2WzTew,6148
|
145
143
|
cjkcms/static/cjkcms/bi/bootstrap-icons.css,sha256=dZRvUx65x4IL8xmd7cFttdizYwtNjkXq_sWUxeypWmc,93729
|
146
144
|
cjkcms/static/cjkcms/bi/bootstrap-icons.json,sha256=9_CfjAQgfiFAClLceQJhTzy5oZUHAMNV19JV1duLWKQ,49971
|
147
145
|
cjkcms/static/cjkcms/bi/bootstrap-icons.scss,sha256=LEofdAzggOh9QQOgtA4YXf90GWwbQq8YgepHgcLNf5o,55169
|
@@ -169,12 +167,8 @@ cjkcms/static/cjkcms/js/cjkcms-editor.js,sha256=ZIdSmXSBx0h3narH6ge0ZJlllOdV8M1J
|
|
169
167
|
cjkcms/static/cjkcms/js/cjkcms-front.js,sha256=rutoF9X9-HdxtH2ehOP3LZK3JcDYDN3iUqsO6f1n68A,5579
|
170
168
|
cjkcms/static/cookieconsent/cookieconsent.css,sha256=PPTG3VhEwHh8jgoiOgifordwvLTG5M7hEhrueOUy4Kc,18803
|
171
169
|
cjkcms/static/cookieconsent/cookieconsent.js,sha256=r372zsTupu5VyD3zkc-VWL5tGUNhz5FNcPK9WkP9Mz0,18743
|
172
|
-
cjkcms/static/vendor/.DS_Store,sha256=GJykjgDaphdCrGMpJ6quiM-qyxx2i6CneZUAwtBl9kg,6148
|
173
|
-
cjkcms/static/vendor/mdb/.DS_Store,sha256=zdOnEhljh0QvQexXcd1-s9dQOHj4ws_ueGV8UlyT0rs,6148
|
174
|
-
cjkcms/static/vendor/mdb/css/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
|
175
170
|
cjkcms/static/vendor/mdb/css/mdb.min.css,sha256=1iGJEwUZEQyasXLHrSSe-DR9gE_s8Nq7vkndlhlKr28,379902
|
176
171
|
cjkcms/static/vendor/mdb/css/mdb.min.css.map,sha256=NKAF5z9x63H4yfAMe5uQCK5bqpqDokyA-OZ8Js5VRpM,548537
|
177
|
-
cjkcms/static/vendor/mdb/js/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
|
178
172
|
cjkcms/static/vendor/mdb/js/mdb.umd.min.js,sha256=3KDxvzTmoG1orgwfGejdsnHqPtLkzmGKFaVIonmWhV8,125175
|
179
173
|
cjkcms/static/vendor/mdb/js/mdb.umd.min.js.map,sha256=DVxK_TI0xijPyBf5LrUX8xx6LkB-SfgAgf04jQY0vxQ,505660
|
180
174
|
cjkcms/static/vendor/simplycountdown/css/circle.css,sha256=p8XghcW_i3DReRzmivluCPvvTeufVcyzpQRlHtYPxwI,1632
|
@@ -184,10 +178,8 @@ cjkcms/static/vendor/simplycountdown/css/light.css,sha256=WXbRsGaWA-xmc-tMeTNGvx
|
|
184
178
|
cjkcms/static/vendor/simplycountdown/css/losange.css,sha256=qzyTDoj2LhR6JMQB7OAe3nwG1Wm3Te4rnDmq1qRBw5s,1803
|
185
179
|
cjkcms/static/vendor/simplycountdown/js/simplyCountdown.umd.js,sha256=Jiw45EkrYMAywPxoUK0G7sUaZWZo6Aucpw5gt8YIl7w,5024
|
186
180
|
cjkcms/static/vendor/simplycountdown/js/simplyCountdown.umd.js.map,sha256=qunXuRwA6mOaCihYJfsIg7J72p3XaurneVGSTNPez7Y,25873
|
187
|
-
cjkcms/templates/.DS_Store,sha256=dyZnb39fKIIkLjeDh-Q3jgmLIVt624Ouh-D6Bg_KNAU,6148
|
188
181
|
cjkcms/templates/404.html,sha256=GnIFZoXMcFzz_UTMChOgbO6-IIWQZKaAom7OJXn6dao,3245
|
189
182
|
cjkcms/templates/500.html,sha256=YWYel2g2SDKLwSv8C9VLPzVvkcRLo6X9WYwWjxnfz0U,4802
|
190
|
-
cjkcms/templates/cjkcms/.DS_Store,sha256=NwzhrmDltCxS7YoBeOATZudLJpi4MQUWmPTib_I-ODw,6148
|
191
183
|
cjkcms/templates/cjkcms/robots.txt,sha256=669-RWM9DZYUfyxUvl2Fxn6pcZ_7Efbb7HeZYoR0DWo,92
|
192
184
|
cjkcms/templates/cjkcms/blocks/accordion_block.html,sha256=9gsMZMflXqdYcFVqf8YOsyb3YYHgC26Sug_tzGvc6N8,1443
|
193
185
|
cjkcms/templates/cjkcms/blocks/article_block_card.html,sha256=37Xb0XNGVSyWP8gXVGh742eZmW-3hFSmEAfCe5QOrvo,974
|
@@ -320,7 +312,7 @@ cjkcms/templates/wagtailadmin/shared/cr_main_nav_2fix.html,sha256=BAhkDE8_8KbhUO
|
|
320
312
|
cjkcms/templates/wagtailadmin/tables/thumbnail_cell.html,sha256=RzMT-tBnnDOgL-zexKanZTTpCEX1bMybFL2p_zvOEV4,578
|
321
313
|
cjkcms/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
322
314
|
cjkcms/templatetags/auth_extras.py,sha256=IIxQ5n9FaQVZmhW-yW1XM5p2OjIemtqVoX-O-UcCns8,327
|
323
|
-
cjkcms/templatetags/cjkcms_tags.py,sha256=
|
315
|
+
cjkcms/templatetags/cjkcms_tags.py,sha256=JlZ78iPiKdfmb1zQnnQtYj6L13_GTcWryhDH7W92qoU,10339
|
324
316
|
cjkcms/templatetags/friendly_loader.py,sha256=Zwopb9NNNN6IuDJCMFlwKuhmJC0hi4uTPEZSAxeakYY,4962
|
325
317
|
cjkcms/templatetags/gravatar.py,sha256=JG5MB6HUFso15J8gZ_te5FTMYAuo4km8rzMKKvLLh-E,1127
|
326
318
|
cjkcms/templatetags/txtutils_tags.py,sha256=UMojdiLt6Jpijc-2QLusPc-qXX9bqFZf0JbqqPsfnWQ,1223
|
@@ -341,18 +333,16 @@ cjkcms/tests/test_urls.py,sha256=otiKZcs1WLDQM6AOfcdZgsOGDwea1qS3VEc8Yy-FV-Q,288
|
|
341
333
|
cjkcms/tests/test_webpage.py,sha256=PvXeXbawigObsdi_YpQNuHFx3Lqi6wM3ktVHZsxYbr4,1520
|
342
334
|
cjkcms/tests/urls.py,sha256=_ksKz7HBHJtQK3HxC9cmJMX_dt6n4alx3FXjcL-cu28,850
|
343
335
|
cjkcms/tests/media/images/test.original.png,sha256=nLMtadXZhXXbt6DTm5enrysKX7cfWiUudtbS2X7mSzI,1938
|
344
|
-
cjkcms/tests/media/images/test_O3GLriA.original.png,sha256=nLMtadXZhXXbt6DTm5enrysKX7cfWiUudtbS2X7mSzI,1938
|
345
336
|
cjkcms/tests/media/original_images/test.png,sha256=xJDvcufuQ-AM1HT-zgMxYEORko4rdK_8MSHU-puJNW8,2306
|
346
|
-
cjkcms/tests/media/original_images/test_O3GLriA.png,sha256=xJDvcufuQ-AM1HT-zgMxYEORko4rdK_8MSHU-puJNW8,2306
|
347
337
|
cjkcms/tests/testapp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
348
338
|
cjkcms/tests/testapp/apps.py,sha256=EwyrkWTu-_OoLoERBTlqkqfPIIrEsbHY3kbCxgrv_7I,169
|
349
339
|
cjkcms/tests/testapp/models.py,sha256=Rkn9KHrGbLzrKjP4y_gwtXma1_fJOZNU7ekb689fJEU,488
|
350
340
|
cjkcms/tests/testapp/migrations/0001_initial.py,sha256=hxr-r-42IQEGr_OsZkxXXCW7wbxAHuI_OLOkn-seJUU,4942
|
351
341
|
cjkcms/tests/testapp/migrations/0002_create_homepage.py,sha256=EfsxHh1oyqwahW9RVpTvaRDx_CHtFSJQahKEr7XC5Gg,1999
|
352
342
|
cjkcms/tests/testapp/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
353
|
-
wagtail_cjkcms-25.1.
|
354
|
-
wagtail_cjkcms-25.1.
|
355
|
-
wagtail_cjkcms-25.1.
|
356
|
-
wagtail_cjkcms-25.1.
|
357
|
-
wagtail_cjkcms-25.1.
|
358
|
-
wagtail_cjkcms-25.1.
|
343
|
+
wagtail_cjkcms-25.1.5.dist-info/LICENSE,sha256=KHsCh1fKOZzvcKe1a9h3FlDjTjK_UurO3wHK55TnHHo,1538
|
344
|
+
wagtail_cjkcms-25.1.5.dist-info/METADATA,sha256=jhcINU9cA_1EBRqll_tUVnMkiQ6JI_xKK7SSPiED0XA,3120
|
345
|
+
wagtail_cjkcms-25.1.5.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
|
346
|
+
wagtail_cjkcms-25.1.5.dist-info/entry_points.txt,sha256=FzoiFENdZ1uebNztyz6GlswkumQspd5VjWbR9MUIH_8,50
|
347
|
+
wagtail_cjkcms-25.1.5.dist-info/top_level.txt,sha256=8wJGOGo1pG5nO5akfcMzA7i3ndj5868I8w35vTT0JJM,7
|
348
|
+
wagtail_cjkcms-25.1.5.dist-info/RECORD,,
|
cjkcms/.DS_Store
DELETED
Binary file
|
cjkcms/static/.DS_Store
DELETED
Binary file
|
cjkcms/static/vendor/.DS_Store
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
cjkcms/templates/.DS_Store
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|