Skip to content
Snippets Groups Projects
Commit 56b67048 authored by Tomáš Valenta's avatar Tomáš Valenta
Browse files

remove unused blocks

parent a8b80840
No related branches found
No related tags found
No related merge requests found
from wagtail.blocks import ( from wagtail.blocks import (
CharBlock, CharBlock,
DateBlock,
EmailBlock, EmailBlock,
PageChooserBlock,
StructBlock, StructBlock,
TextBlock, TextBlock,
URLBlock,
) )
from wagtail.documents.blocks import DocumentChooserBlock
class PersonBlock(StructBlock): class PersonBlock(StructBlock):
...@@ -19,27 +15,3 @@ class PersonBlock(StructBlock): ...@@ -19,27 +15,3 @@ class PersonBlock(StructBlock):
label = "Osoba" label = "Osoba"
template = "home/blocks/person_block.html" template = "home/blocks/person_block.html"
icon = "user" icon = "user"
class DocumentBlock(StructBlock):
name = CharBlock(label="Jméno")
date_added = DateBlock(label="Datum přidání", required=False)
page = PageChooserBlock(label="Stránka (místo dokumentu)", required=False)
file = DocumentChooserBlock(label="Dokument", required=False)
class Meta:
label = "Dokument"
template = "home/blocks/document_block.html"
icon = "doc-full-inverse"
class EventBlock(StructBlock):
name = CharBlock(label="Jméno")
page = PageChooserBlock(label="Stránka")
date = DateBlock(label="Datum konání", required=False)
location = CharBlock(label="Lokace", required=False)
class Meta:
label = "Událost"
template = "home/blocks/event_block.html"
icon = "calendar-alt"
...@@ -11,26 +11,6 @@ from .blocks import DocumentBlock, EventBlock, PersonBlock ...@@ -11,26 +11,6 @@ from .blocks import DocumentBlock, EventBlock, PersonBlock
class HomePage(Page): class HomePage(Page):
heading_text = RichTextField(verbose_name="Hlavní text stránky") heading_text = RichTextField(verbose_name="Hlavní text stránky")
# --- Events ---
events = StreamField(
[("event", EventBlock())],
verbose_name="Události",
use_json_field=True,
blank=True,
null=True,
)
# --- Documents ---
documents = StreamField(
[("document", DocumentBlock())],
verbose_name="Dokumenty",
use_json_field=True,
blank=True,
null=True,
)
# --- Donations --- # --- Donations ---
donation_text = RichTextField(verbose_name="Text pro dary") donation_text = RichTextField(verbose_name="Text pro dary")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment