Skip to content
Snippets Groups Projects
Commit cc52f829 authored by Alexa Valentová's avatar Alexa Valentová
Browse files

clean up blocks

parent c8470730
No related branches found
No related tags found
2 merge requests!1047Uniweb redesign,!1045Uniweb redesign, minor district redesign fixes
......@@ -21,7 +21,7 @@ from shared.models import (
ExtendedMetadataPageMixin,
SubpageMixin,
)
from shared.models.legacy import FooterMixin
from shared_legacy.models import FooterMixin
from tuning import admin_help
HELP_COMBINED_TITLE = (
......
......@@ -1065,25 +1065,6 @@ class ChartBlock(blocks.StructBlock):
Zobrazí se tolik definovaných sloupců, kolik existuje skupin."""
class FooterLinksBlock(blocks.StructBlock):
label = blocks.CharBlock(label="Titulek zápatí", required=True)
items = blocks.ListBlock(
blocks.StructBlock(
[
("url", blocks.URLBlock(label="Odkaz")),
("text", blocks.CharBlock(label="Text v odkazu")),
]
),
label="Odkazy",
required=True,
)
class Meta:
label = "Seznam odkazů v zápatí"
icon = "list-ul"
template = "shared/blocks/footer_links_block.html"
class NewsletterSubscriptionBlock(blocks.StructBlock):
list_id = blocks.CharBlock(label="ID newsletteru", required=True)
......
......@@ -9,7 +9,7 @@ from wagtail.fields import StreamField
from wagtail.models import Page
from wagtail.search import index
from shared.blocks import DEFAULT_CONTENT_BLOCKS, FooterLinksBlock
from shared.blocks import DEFAULT_CONTENT_BLOCKS
from .main import ArticlesMixin
......@@ -174,21 +174,6 @@ class ArticleMixin(models.Model):
return self.perex
class FooterMixin(models.Model):
footer_links = StreamField(
[
("footer_links", FooterLinksBlock()),
],
verbose_name="Odkazy v zápatí webu",
blank=True,
max_num=1,
use_json_field=True,
)
class Meta:
abstract = True
class ArticlesPageMixin(ArticlesMixin, models.Model):
def get_shared_tags(self):
"""
......
......@@ -19,7 +19,7 @@ from wagtail.fields import StreamField
from wagtail.models import Page
from wagtail.search import index
from shared.blocks import (
from shared_legacy.blocks import (
DEFAULT_CONTENT_BLOCKS,
FooterLinksBlock,
MenuItemBlock,
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment