add support for opening hours that automatically change over time

This commit is contained in:
2024-07-08 02:42:02 +02:00
parent ada7d25083
commit 355887518b
23 changed files with 834 additions and 18 deletions
+8
View File
@@ -169,6 +169,13 @@ class NeufAddressSectionBlock(blocks.StaticBlock):
admin_text = "Viser adressen og Google-kart."
class OpeningHoursSectionBlock(blocks.StaticBlock):
class Meta:
icon = "time"
label = "Chateau Neuf: Åpningstider"
admin_text = "Viser gjeldende åpningstider."
BASE_BLOCKS = [
("paragraph", blocks.RichTextBlock(label="Rik tekst")),
("image", ImageWithTextBlock(label="Bilde")),
@@ -199,6 +206,7 @@ class PageSectionBlock(blocks.StructBlock):
[block for block in BASE_BLOCKS if block[0] != "page_section_navigation"]
+ [
("neuf_address", NeufAddressSectionBlock()),
("opening_hours", OpeningHoursSectionBlock()),
]
)
+3
View File
@@ -34,6 +34,7 @@ INSTALLED_APPS = [
"events",
"venues",
"news",
"openinghours",
# end cms apps
"grapple",
"graphene_django",
@@ -51,6 +52,7 @@ INSTALLED_APPS = [
"wagtail",
"modelcluster",
"taggit",
"django_extensions",
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
@@ -195,6 +197,7 @@ GRAPPLE = {
"events",
"venues",
"news",
"openinghours",
],
"EXPOSE_GRAPHIQL": True,
}