Skip to content
Snippets Groups Projects
Select Git revision
  • af8780327efd11c901dd15fad64c70c375dd3875
  • master default protected
2 results

run-document-server.sh

Blame
  • 0021_elections2021homepage_carousel.py 2.83 KiB
    # Generated by Django 3.2.2 on 2021-05-17 12:05
    
    import wagtail.blocks
    import wagtail.fields
    import wagtail.images.blocks
    from django.db import migrations
    
    
    class Migration(migrations.Migration):
        dependencies = [
            ("elections2021", "0020_auto_20210517_0235"),
        ]
    
        operations = [
            migrations.AddField(
                model_name="elections2021homepage",
                name="carousel",
                field=wagtail.fields.StreamField(
                    [
                        (
                            "slide",
                            wagtail.blocks.StructBlock(
                                [
                                    (
                                        "title",
                                        wagtail.blocks.CharBlock(label="titulek"),
                                    ),
                                    (
                                        "photo",
                                        wagtail.images.blocks.ImageChooserBlock(
                                            label="fotka"
                                        ),
                                    ),
                                    (
                                        "page",
                                        wagtail.blocks.PageChooserBlock(
                                            label="stránka do tlačítka",
                                            page_type=[
                                                "elections2021.Elections2021ArticlesPage",
                                                "elections2021.Elections2021CandidatesListPage",
                                                "elections2021.Elections2021CandidatesMapPage",
                                                "elections2021.Elections2021ProgramPage",
                                                "elections2021.Elections2021QuestionsPage",
                                                "elections2021.Elections2021ProgramAppPage",
                                                "elections2021.Elections2021TextPage",
                                                "elections2021.Elections2021StrategicListPage",
                                                "elections2021.Elections2021StrategicPage",
                                            ],
                                            required=False,
                                        ),
                                    ),
                                    (
                                        "raw_url",
                                        wagtail.blocks.CharBlock(
                                            label="ručně zadaný odkaz do tlačítka (místo stránky)",
                                            required=False,
                                        ),
                                    ),
                                ]
                            ),
                        )
                    ],
                    blank=True,
                    verbose_name="obsah slideru",
                ),
            ),
        ]