add support for opening hours that automatically change over time
This commit is contained in:
@@ -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()),
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user