Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • to/majak
  • b1242/majak
2 results
Select Git revision
Show changes
Showing
with 2364 additions and 0 deletions
# Generated by Django 4.0.3 on 2022-03-25 09:33
import wagtail.blocks
import wagtail.contrib.table_block.blocks
import wagtail.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0046_districtcenterpage_content"),
]
operations = [
migrations.AddField(
model_name="districtcrossroadpage",
name="content",
field=wagtail.fields.StreamField(
[
(
"people_group",
wagtail.blocks.StructBlock(
[
(
"group_title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"person_list",
wagtail.blocks.ListBlock(
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=["district.DistrictPersonPage"],
),
label="List osob",
),
),
]
),
)
],
blank=True,
verbose_name="Obsah stránky",
),
),
migrations.AlterField(
model_name="districtcustompage",
name="content",
field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
("table", wagtail.contrib.table_block.blocks.TableBlock()),
(
"people_group",
wagtail.blocks.StructBlock(
[
(
"group_title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"person_list",
wagtail.blocks.ListBlock(
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=["district.DistrictPersonPage"],
),
label="List osob",
),
),
]
),
),
],
blank=True,
verbose_name="Obsah",
),
),
]
# Generated by Django 4.0.3 on 2022-03-25 09:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("district", "0047_districtcrossroadpage_content_and_more"),
]
operations = [
migrations.AddField(
model_name="districthomepage",
name="footperson_coord_title",
field=models.CharField(
default="Koordinátor", max_length=128, verbose_name="Název funkce"
),
),
migrations.AddField(
model_name="districthomepage",
name="footperson_electman_title",
field=models.CharField(
default="Volební manažer", max_length=128, verbose_name="Název funkce"
),
),
migrations.AddField(
model_name="districthomepage",
name="footperson_media_title",
field=models.CharField(
default="Kontakt pro média", max_length=128, verbose_name="Název funkce"
),
),
]
# Generated by Django 4.0.3 on 2022-04-01 10:21
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0048_districthomepage_footperson_coord_title_and_more"),
]
operations = [
migrations.AlterField(
model_name="districtcrossroadpage",
name="cards_content",
field=wagtail.fields.StreamField(
[
(
"cards",
wagtail.blocks.StructBlock(
[
(
"headline",
wagtail.blocks.CharBlock(
label="Titulek bloku", required=False
),
),
(
"card_items",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"image",
wagtail.images.blocks.ImageChooserBlock(
label="Obrázek"
),
),
(
"title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"page",
wagtail.blocks.PageChooserBlock(
label="Stránka",
page_type=[
# "district.DistrictAfterElectionPage",
"district.DistrictArticlePage",
"district.DistrictArticlesPage",
"district.DistrictCenterPage",
"district.DistrictContactPage",
"district.DistrictCrossroadPage",
"district.DistrictCustomPage",
# "district.DistrictElectionPage",
# "district.DistrictElectionPointPage",
"district.DistrictPeoplePage",
"district.DistrictPersonPage",
# "district.DistrictProgramPage",
# "district.DistrictTagsPage",
],
required=False,
),
),
(
"link",
wagtail.blocks.URLBlock(
label="Odkaz", required=False
),
),
]
),
label="Karty odkazu",
),
),
]
),
)
],
blank=True,
verbose_name="Karty rozcestníku",
),
),
]
# Generated by Django 4.0.3 on 2022-04-01 11:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("district", "0048_districthomepage_footperson_coord_title_and_more"),
]
operations = [
migrations.AddField(
model_name="districtarticlespage",
name="last_import_log",
field=models.TextField(
blank=True, null=True, verbose_name="Výstup z posledního importu"
),
),
]
# Generated by Django 4.0.3 on 2022-04-01 10:49
import wagtail.blocks
import wagtail.contrib.table_block.blocks
import wagtail.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0049_alter_districtcrossroadpage_cards_content"),
]
operations = [
migrations.AlterField(
model_name="districtcrossroadpage",
name="content",
field=wagtail.fields.StreamField(
[
(
"people_group",
wagtail.blocks.StructBlock(
[
(
"group_title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"person_list",
wagtail.blocks.ListBlock(
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage",
],
),
label="List osob",
),
),
]
),
)
],
blank=True,
verbose_name="Obsah stránky",
),
),
migrations.AlterField(
model_name="districtcustompage",
name="content",
field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
("table", wagtail.contrib.table_block.blocks.TableBlock()),
(
"people_group",
wagtail.blocks.StructBlock(
[
(
"group_title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"person_list",
wagtail.blocks.ListBlock(
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage",
],
),
label="List osob",
),
),
]
),
),
],
blank=True,
verbose_name="Obsah",
),
),
migrations.AlterField(
model_name="districtpeoplepage",
name="content",
field=wagtail.fields.StreamField(
[
(
"people_group",
wagtail.blocks.StructBlock(
[
(
"group_title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"person_list",
wagtail.blocks.ListBlock(
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage",
],
),
label="List osob",
),
),
]
),
)
],
blank=True,
verbose_name="Obsah stránky",
),
),
]
# Generated by Django 4.0.3 on 2022-04-01 14:55
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0050_alter_districtcrossroadpage_content_and_more"),
]
operations = [
migrations.AlterField(
model_name="districtarticlepage",
name="content",
field=wagtail.fields.StreamField(
[
(
"text",
wagtail.blocks.RichTextBlock(
features=[
"h2",
"h3",
"h4",
"bold",
"italic",
"ol",
"embed",
"ul",
"link",
"document-link",
"image",
],
label="Textový editor",
),
),
(
"gallery",
wagtail.blocks.StructBlock(
[
(
"gallery_items",
wagtail.blocks.ListBlock(
wagtail.images.blocks.ImageChooserBlock(
label="obrázek", required=True
),
group="ostatní",
icon="image",
label="Galerie",
),
)
],
label="Galerie",
),
),
],
blank=True,
verbose_name="Článek",
),
),
]
# Generated by Django 4.0.3 on 2022-04-04 13:39
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0049_districtarticlespage_last_import_log"),
("district", "0051_alter_districtarticlepage_content"),
]
operations = []
# Generated by Django 4.0.3 on 2022-04-14 12:31
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0052_merge_20220404_1539"),
]
operations = [
migrations.AlterField(
model_name="districtcrossroadpage",
name="cards_content",
field=wagtail.fields.StreamField(
[
(
"cards",
wagtail.blocks.StructBlock(
[
(
"headline",
wagtail.blocks.CharBlock(
label="Titulek bloku", required=False
),
),
(
"card_items",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"image",
wagtail.images.blocks.ImageChooserBlock(
label="Obrázek"
),
),
(
"title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"text",
wagtail.blocks.RichTextBlock(
label="Krátký text pod nadpisem",
required=False,
),
),
(
"page",
wagtail.blocks.PageChooserBlock(
label="Stránka",
page_type=[
# "district.DistrictAfterElectionPage",
"district.DistrictArticlePage",
"district.DistrictArticlesPage",
"district.DistrictCenterPage",
"district.DistrictContactPage",
"district.DistrictCrossroadPage",
"district.DistrictCustomPage",
# "district.DistrictElectionPage",
# "district.DistrictElectionPointPage",
"district.DistrictPeoplePage",
"district.DistrictPersonPage",
# "district.DistrictProgramPage",
# "district.DistrictTagsPage",
],
required=False,
),
),
(
"link",
wagtail.blocks.URLBlock(
label="Odkaz", required=False
),
),
]
),
label="Karty odkazu",
),
),
]
),
)
],
blank=True,
verbose_name="Karty rozcestníku",
),
),
]
# Generated by Django 4.0.3 on 2022-04-14 14:06
import wagtail.blocks
import wagtail.contrib.table_block.blocks
import wagtail.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0053_alter_districtcrossroadpage_cards_content"),
]
operations = [
migrations.AlterField(
model_name="districtcenterpage",
name="content",
field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
(
"table",
wagtail.contrib.table_block.blocks.TableBlock(
table_options={"renderer": "html"}
),
),
],
blank=True,
verbose_name="Obsah",
),
),
migrations.AlterField(
model_name="districtcustompage",
name="content",
field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
(
"table",
wagtail.contrib.table_block.blocks.TableBlock(
table_options={"renderer": "html"}
),
),
(
"people_group",
wagtail.blocks.StructBlock(
[
(
"group_title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"person_list",
wagtail.blocks.ListBlock(
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage",
],
),
label="List osob",
),
),
]
),
),
],
blank=True,
verbose_name="Obsah",
),
),
]
# Generated by Django 4.0.3 on 2022-04-21 08:57
import wagtail.blocks
import wagtail.contrib.table_block.blocks
import wagtail.fields
import wagtail.images.blocks
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0054_alter_districtcenterpage_content_and_more"),
]
operations = [
migrations.AlterField(
model_name="districtarticlepage",
name="content",
field=wagtail.fields.StreamField(
[
(
"text",
wagtail.blocks.RichTextBlock(
features=[
"h2",
"h3",
"h4",
"bold",
"italic",
"ol",
"embed",
"ul",
"link",
"document-link",
"image",
],
label="Textový editor",
),
),
(
"gallery",
wagtail.blocks.StructBlock(
[
(
"gallery_items",
wagtail.blocks.ListBlock(
wagtail.images.blocks.ImageChooserBlock(
label="obrázek", required=True
),
group="ostatní",
icon="image",
label="Galerie",
),
)
],
label="Galerie",
),
),
(
"youtube",
wagtail.blocks.StructBlock(
[
(
"video_url",
wagtail.blocks.URLBlock(
help_text="Odkaz na YouTube video bude automaticky zkonvertován na ID videa a NEBUDE uložen.",
label="Odkaz na video",
required=False,
),
),
(
"video_id",
wagtail.blocks.CharBlock(
help_text="Není třeba vyplňovat, bude automaticky načteno z odkazu.",
label="ID videa (automatické pole)",
required=False,
),
),
],
label="YouTube video",
),
),
],
blank=True,
verbose_name="Článek",
),
),
migrations.AlterField(
model_name="districtcenterpage",
name="content",
field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
("table", wagtail.contrib.table_block.blocks.TableBlock()),
],
blank=True,
verbose_name="Obsah",
),
),
migrations.AlterField(
model_name="districtcustompage",
name="content",
field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
("table", wagtail.contrib.table_block.blocks.TableBlock()),
(
"people_group",
wagtail.blocks.StructBlock(
[
(
"group_title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"person_list",
wagtail.blocks.ListBlock(
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage",
],
),
label="List osob",
),
),
]
),
),
],
blank=True,
verbose_name="Obsah",
),
),
migrations.AlterField(
model_name="districtprogrampage",
name="content",
field=wagtail.fields.StreamField(
[
(
"static_program_block",
wagtail.blocks.StructBlock(
[
(
"headline",
wagtail.blocks.CharBlock(
label="Titulek bloku", required=True
),
),
(
"perex",
wagtail.blocks.TextBlock(
label="Krátký text pod nadpisem", required=True
),
),
(
"person",
wagtail.blocks.PageChooserBlock(
label="Garant",
page_type=["district.DistrictPersonPage"],
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení", required=True
),
),
(
"program_items",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Název", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení",
required=True,
),
),
]
),
label="Seznam bodů",
),
),
]
),
),
(
"redmine_program_block",
wagtail.blocks.StructBlock(
[
(
"headline",
wagtail.blocks.CharBlock(
label="Titulek bloku", required=True
),
),
(
"perex",
wagtail.blocks.TextBlock(
label="Krátký text pod nadpisem", required=True
),
),
(
"person",
wagtail.blocks.PageChooserBlock(
label="Garant",
page_type=["district.DistrictPersonPage"],
),
),
(
"redmine_issue",
wagtail.blocks.IntegerBlock(
label="Číslo Redmine issue", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
help_text="Hodnota se automaticky načte s Redmine",
label="Procento dokončení - bude doplněno automaticky",
required=False,
),
),
(
"program_items",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Název", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení",
required=True,
),
),
]
),
help_text="Hodnota se automaticky načte s Redmine",
label="Seznam bodů - bude doplněno automaticky",
required=False,
),
),
]
),
),
],
blank=True,
verbose_name="obsah stránky",
),
),
]
# Generated by Django 4.0.3 on 2022-04-21 08:03
import wagtail.blocks
import wagtail.contrib.table_block.blocks
import wagtail.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0054_alter_districtcenterpage_content_and_more"),
]
operations = [
migrations.AlterField(
model_name="districtcenterpage",
name="content",
field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
("table", wagtail.contrib.table_block.blocks.TableBlock()),
],
blank=True,
verbose_name="Obsah",
),
),
migrations.AlterField(
model_name="districtcustompage",
name="content",
field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
("table", wagtail.contrib.table_block.blocks.TableBlock()),
(
"people_group",
wagtail.blocks.StructBlock(
[
(
"group_title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"person_list",
wagtail.blocks.ListBlock(
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage",
],
),
label="List osob",
),
),
]
),
),
],
blank=True,
verbose_name="Obsah",
),
),
migrations.AlterField(
model_name="districtprogrampage",
name="content",
field=wagtail.fields.StreamField(
[
(
"static_program_block",
wagtail.blocks.StructBlock(
[
(
"headline",
wagtail.blocks.CharBlock(
label="Titulek bloku", required=True
),
),
(
"perex",
wagtail.blocks.TextBlock(
label="Krátký text pod nadpisem", required=True
),
),
(
"person",
wagtail.blocks.PageChooserBlock(
label="Garant",
page_type=["district.DistrictPersonPage"],
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení", required=True
),
),
(
"program_items",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Název", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení",
required=True,
),
),
]
),
label="Seznam bodů",
),
),
]
),
),
(
"redmine_program_block",
wagtail.blocks.StructBlock(
[
(
"headline",
wagtail.blocks.CharBlock(
label="Titulek bloku", required=True
),
),
(
"perex",
wagtail.blocks.TextBlock(
label="Krátký text pod nadpisem", required=True
),
),
(
"person",
wagtail.blocks.PageChooserBlock(
label="Garant",
page_type=["district.DistrictPersonPage"],
),
),
(
"redmine_issue",
wagtail.blocks.IntegerBlock(
label="Číslo Redmine issue", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
help_text="Hodnota se automaticky načte s Redmine",
label="Procento dokončení - bude doplněno automaticky",
required=False,
),
),
(
"program_items",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Název", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení",
required=True,
),
),
]
),
help_text="Hodnota se automaticky načte s Redmine",
label="Seznam bodů - bude doplněno automaticky",
required=False,
),
),
]
),
),
],
blank=True,
verbose_name="obsah stránky",
),
),
]
# Generated by Django 4.0.3 on 2022-04-25 08:24
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks
from django.db import migrations
from wagtail.blocks.stream_block import StreamValue
def plain_to_structured(block):
modified_items = []
for item in block["value"]["contact_list"]:
modified_items.append(
{
**item,
"value": {
"person": item["value"],
"position": "",
},
}
)
block["value"]["contact_list"] = modified_items
return block
def structured_to_plain(block):
modified_items = []
for item in block["value"]["contact_list"]:
modified_items.append({**item, "value": item["value"]["person"]})
block["value"]["contact_list"] = modified_items
return block
def get_sidebar_content(page, mapper):
stream_data = []
mapped = False
for block in page.sidebar_content.raw_data:
if block["type"] == "contact":
stream_data.append(mapper(block))
mapped = True
else:
stream_data.append(block)
return stream_data, mapped
def migrate(apps, mapper):
DistrictCenterPage = apps.get_model("district", "DistrictCenterPage")
for page in DistrictCenterPage.objects.all():
sidebar_content, mapped = get_sidebar_content(page, mapper)
if mapped:
page.sidebar_content = StreamValue(
page.sidebar_content, sidebar_content, is_lazy=True
)
page.save()
def forwards(apps, schema_editor):
migrate(apps, plain_to_structured)
def backwards(apps, schema_editor):
migrate(apps, structured_to_plain)
class Migration(migrations.Migration):
dependencies = [
("district", "0055_alter_districtcenterpage_content_and_more"),
]
operations = [
migrations.AlterField(
model_name="districtcenterpage",
name="sidebar_content",
field=wagtail.fields.StreamField(
[
(
"address",
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"map_image",
wagtail.images.blocks.ImageChooserBlock(
label="Obrázek mapy", required=False
),
),
(
"map_link",
wagtail.blocks.URLBlock(
label="Odkaz na detail mapy", required=False
),
),
(
"address",
wagtail.blocks.TextBlock(
label="Adresa", required=True
),
),
(
"address_info",
wagtail.blocks.TextBlock(
label="Info k adrese", required=False
),
),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"contact_list",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"person",
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage"
],
),
),
(
"position",
wagtail.blocks.CharBlock(
label="Pozice", required=False
),
),
]
)
),
),
]
),
),
],
blank=True,
verbose_name="Obsah bočního panelu",
),
),
migrations.AlterField(
model_name="districtcenterpage",
name="text",
field=wagtail.fields.RichTextField(
blank=True, null=True, verbose_name="Text"
),
),
migrations.RunPython(forwards, backwards),
]
# Generated by Django 4.0.3 on 2022-04-21 09:25
import wagtail.blocks
import wagtail.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0055_alter_districtarticlepage_content_and_more"),
]
operations = [
migrations.AlterField(
model_name="districtprogrampage",
name="content",
field=wagtail.fields.StreamField(
[
(
"static_program_block",
wagtail.blocks.StructBlock(
[
(
"headline",
wagtail.blocks.CharBlock(
label="Titulek bloku", required=True
),
),
(
"perex",
wagtail.blocks.TextBlock(
label="Krátký text pod nadpisem", required=True
),
),
(
"person",
wagtail.blocks.PageChooserBlock(
label="Garant",
page_type=["district.DistrictPersonPage"],
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení", required=True
),
),
(
"program_items",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Název", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení",
required=True,
),
),
(
"issue_link",
wagtail.blocks.URLBlock(
label="Odkaz na Redmine issue",
required=False,
),
),
]
),
label="Seznam bodů",
),
),
]
),
),
(
"redmine_program_block",
wagtail.blocks.StructBlock(
[
(
"headline",
wagtail.blocks.CharBlock(
label="Titulek bloku", required=True
),
),
(
"perex",
wagtail.blocks.TextBlock(
label="Krátký text pod nadpisem", required=True
),
),
(
"person",
wagtail.blocks.PageChooserBlock(
label="Garant",
page_type=["district.DistrictPersonPage"],
),
),
(
"redmine_issue",
wagtail.blocks.IntegerBlock(
label="Číslo Redmine issue", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
help_text="Hodnota se automaticky načte s Redmine",
label="Procento dokončení - bude doplněno automaticky",
required=False,
),
),
(
"program_items",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Název", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení",
required=True,
),
),
(
"issue_link",
wagtail.blocks.URLBlock(
label="Odkaz na Redmine issue",
required=False,
),
),
]
),
help_text="Hodnota se automaticky načte s Redmine",
label="Seznam bodů - bude doplněno automaticky",
required=False,
),
),
]
),
),
],
blank=True,
verbose_name="obsah stránky",
),
),
]
# Generated by Django 4.0.3 on 2022-04-26 11:42
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0055_alter_districtcenterpage_content_and_more"),
("district", "0056_alter_districtprogrampage_content"),
]
operations = []
# Generated by Django 4.0.3 on 2022-04-26 12:09
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0056_alter_districtcenterpage_sidebar_content_and_more"),
("district", "0057_merge_20220426_1342"),
]
operations = []
# Generated by Django 4.0.3 on 2022-04-26 12:09
import wagtail.blocks
import wagtail.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0058_merge_20220426_1409"),
]
operations = [
migrations.AlterField(
model_name="districtprogrampage",
name="content",
field=wagtail.fields.StreamField(
[
(
"static_program_block",
wagtail.blocks.StructBlock(
[
(
"headline",
wagtail.blocks.CharBlock(
label="Titulek bloku", required=True
),
),
(
"perex",
wagtail.blocks.TextBlock(
label="Krátký text pod nadpisem", required=True
),
),
(
"person",
wagtail.blocks.PageChooserBlock(
label="Garant",
page_type=["district.DistrictPersonPage"],
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení", required=True
),
),
(
"program_items",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Název", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení",
required=True,
),
),
(
"issue_link",
wagtail.blocks.URLBlock(
label="Odkaz na Redmine issue",
required=False,
),
),
]
),
label="Seznam bodů",
),
),
]
),
),
(
"redmine_program_block",
wagtail.blocks.StructBlock(
[
(
"headline",
wagtail.blocks.CharBlock(
label="Titulek bloku", required=True
),
),
(
"perex",
wagtail.blocks.TextBlock(
label="Krátký text pod nadpisem", required=True
),
),
(
"person",
wagtail.blocks.PageChooserBlock(
label="Garant",
page_type=["district.DistrictPersonPage"],
),
),
(
"redmine_issue",
wagtail.blocks.IntegerBlock(
label="Číslo Redmine issue", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
help_text="Hodnota se automaticky načte s Redmine",
label="Procento dokončení - bude doplněno automaticky",
required=False,
),
),
(
"program_items",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Název", required=True
),
),
(
"completion_percentage",
wagtail.blocks.IntegerBlock(
label="Procento dokončení",
required=True,
),
),
(
"issue_link",
wagtail.blocks.URLBlock(
label="Odkaz na Redmine issue",
required=False,
),
),
]
),
help_text="Hodnota se automaticky načte s Redmine",
label="Seznam bodů - bude doplněno automaticky",
required=False,
),
),
]
),
),
],
blank=True,
verbose_name="obsah stránky",
),
),
]
# Generated by Django 4.0.3 on 2022-04-27 12:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("district", "0059_alter_districtprogrampage_content"),
]
operations = [
migrations.AddField(
model_name="districthomepage",
name="title_suffix",
field=models.CharField(
blank=True,
help_text="Umožňuje přidat příponu k základnímu titulku stránky. Pokud je např. titulek stránky pojmenovaný 'Kontakt' a do přípony vyplníte 'MS Pardubice | Piráti', výsledný titulek bude 'Kontakt | MS Pardubice | Piráti'. Pokud příponu nevyplníte, použije se název webu.",
max_length=100,
null=True,
verbose_name="Přípona titulku stránky",
),
),
]
# Generated by Django 4.0.3 on 2022-04-28 12:43
import wagtail.blocks
import wagtail.contrib.table_block.blocks
import wagtail.fields
import wagtail.images.blocks
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0060_districthomepage_title_suffix"),
]
operations = [
migrations.AlterField(
model_name="districtarticlepage",
name="content",
field=wagtail.fields.StreamField(
[
(
"text",
wagtail.blocks.RichTextBlock(
features=[
"h2",
"h3",
"h4",
"bold",
"italic",
"ol",
"embed",
"ul",
"link",
"document-link",
"image",
],
label="Textový editor",
),
),
(
"gallery",
wagtail.blocks.StructBlock(
[
(
"gallery_items",
wagtail.blocks.ListBlock(
wagtail.images.blocks.ImageChooserBlock(
label="obrázek", required=True
),
group="ostatní",
icon="image",
label="Galerie",
),
)
],
label="Galerie",
),
),
(
"youtube",
wagtail.blocks.StructBlock(
[
(
"poster_image",
wagtail.images.blocks.ImageChooserBlock(
help_text="Není třeba vyplňovat, náhled bude dohledán automaticky.",
label="Náhled videa (automatické pole)",
required=False,
),
),
(
"video_url",
wagtail.blocks.URLBlock(
help_text="Odkaz na YouTube video bude automaticky zkonvertován na ID videa a NEBUDE uložen.",
label="Odkaz na video",
required=False,
),
),
(
"video_id",
wagtail.blocks.CharBlock(
help_text="Není třeba vyplňovat, bude automaticky načteno z odkazu.",
label="ID videa (automatické pole)",
required=False,
),
),
],
label="YouTube video",
),
),
],
blank=True,
verbose_name="Článek",
),
),
migrations.AlterField(
model_name="districtcenterpage",
name="content",
field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
(
"table",
wagtail.contrib.table_block.blocks.TableBlock(
template="shared/blocks/table_block.html"
),
),
],
blank=True,
verbose_name="Obsah",
),
),
migrations.AlterField(
model_name="districtcustompage",
name="content",
field=wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
(
"table",
wagtail.contrib.table_block.blocks.TableBlock(
template="shared/blocks/table_block.html"
),
),
(
"people_group",
wagtail.blocks.StructBlock(
[
(
"group_title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"person_list",
wagtail.blocks.ListBlock(
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage",
],
),
label="List osob",
),
),
]
),
),
],
blank=True,
verbose_name="Obsah",
),
),
]
# Generated by Django 4.0.3 on 2022-05-01 09:49
import django.db.models.deletion
import modelcluster.fields
import wagtail.blocks
import wagtail.contrib.table_block.blocks
import wagtail.fields
import wagtail.images.blocks
import wagtailmetadata.models
from django.db import migrations, models
import shared.models
class Migration(migrations.Migration):
dependencies = [
("wagtailcore", "0066_collection_management_permissions"),
("wagtailimages", "0023_add_choose_permissions"),
("district", "0061_alter_districtarticlepage_content_and_more"),
]
operations = [
migrations.CreateModel(
name="DistrictGeoFeatureCollectionCategory",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"sort_order",
models.IntegerField(blank=True, editable=False, null=True),
),
("name", models.CharField(max_length=100, verbose_name="Název")),
(
"hex_color",
models.CharField(
help_text="Zadejte barvu pomocí HEX notace (bez # na začátku).",
max_length=6,
verbose_name="Barva (HEX)",
),
),
],
options={
"verbose_name": "Kategorie mapové kolekce",
},
),
migrations.AddField(
model_name="districthomepage",
name="stadia_apikey",
field=models.CharField(
blank=True,
help_text="API klíč pro Stadia mapy. Získáte po registraci stadiamaps.com.",
max_length=128,
null=True,
verbose_name="Stadia API key",
),
),
migrations.AlterField(
model_name="districtcenterpage",
name="sidebar_content",
field=wagtail.fields.StreamField(
[
(
"map",
wagtail.blocks.StructBlock(
[
(
"lat",
wagtail.blocks.DecimalBlock(
help_text="Např. 50.04075",
label="Zeměpisná šířka",
),
),
(
"lon",
wagtail.blocks.DecimalBlock(
help_text="Např. 15.77659",
label="Zeměpisná délka",
),
),
(
"hex_color",
wagtail.blocks.CharBlock(
default="000000",
help_text="Zadejte barvu pomocí HEX notace (bez # na začátku).",
label="Barva špendlíku (HEX)",
),
),
(
"zoom",
wagtail.blocks.IntegerBlock(
default=15,
label="Výchozí zoom",
max_value=18,
min_value=1,
),
),
(
"style",
wagtail.blocks.ChoiceBlock(
choices=[
("osm-mapnik", "OSM Mapnik"),
("stamen-toner", "Stamen Toner"),
("stamen-terrain", "Stamen Terrain"),
(
"stadia-osm-bright",
"Stadia OSM Bright (vyžaduje API klíč)",
),
(
"stadia-outdoors",
"Stadia Outdoors (vyžaduje API klíč)",
),
],
label="Styl",
),
),
(
"height",
wagtail.blocks.IntegerBlock(
label="Výška v px",
max_value=1000,
min_value=100,
),
),
]
),
),
(
"address",
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"map_image",
wagtail.images.blocks.ImageChooserBlock(
label="Obrázek mapy", required=False
),
),
(
"map_link",
wagtail.blocks.URLBlock(
label="Odkaz na detail mapy", required=False
),
),
(
"address",
wagtail.blocks.TextBlock(
label="Adresa", required=True
),
),
(
"address_info",
wagtail.blocks.TextBlock(
label="Info k adrese", required=False
),
),
]
),
),
(
"contact",
wagtail.blocks.StructBlock(
[
(
"title",
wagtail.blocks.CharBlock(
label="Titulek", required=True
),
),
(
"contact_list",
wagtail.blocks.ListBlock(
wagtail.blocks.StructBlock(
[
(
"person",
wagtail.blocks.PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage"
],
),
),
(
"position",
wagtail.blocks.CharBlock(
label="Pozice", required=False
),
),
]
)
),
),
]
),
),
],
blank=True,
verbose_name="Obsah bočního panelu",
),
),
migrations.CreateModel(
name="DistrictGeoFeatureDetailPage",
fields=[
(
"page_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="wagtailcore.page",
),
),
("perex", models.TextField(verbose_name="Perex")),
(
"geojson",
models.TextField(
help_text="Vložte surový GeoJSON objekt typu 'Feature'. Vyrobit jej můžete např. pomocí online služby geojson.io.",
verbose_name="Geodata",
),
),
(
"content",
wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
("table", wagtail.contrib.table_block.blocks.TableBlock()),
],
blank=True,
verbose_name="Obsah",
),
),
(
"category",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to="district.districtgeofeaturecollectioncategory",
verbose_name="Kategorie",
),
),
(
"guarantor",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
to="district.districtpersonpage",
verbose_name="Garant",
),
),
(
"image",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
to="wagtailimages.image",
verbose_name="obrázek",
),
),
(
"search_image",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="wagtailimages.image",
verbose_name="Search image",
),
),
],
options={
"verbose_name": "Položka mapové kolekce",
},
bases=(
wagtailmetadata.models.WagtailImageMetadataMixin,
shared.models.SubpageMixin,
"wagtailcore.page",
models.Model,
),
),
migrations.CreateModel(
name="DistrictGeoFeatureCollectionPage",
fields=[
(
"page_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="wagtailcore.page",
),
),
("perex", models.TextField(null=True, verbose_name="Perex")),
(
"content",
wagtail.fields.StreamField(
[
("text", wagtail.blocks.RichTextBlock()),
("table", wagtail.contrib.table_block.blocks.TableBlock()),
],
blank=True,
verbose_name="Obsah",
),
),
(
"style",
models.CharField(
choices=[
("osm-mapnik", "OSM Mapnik"),
("stamen-toner", "Stamen Toner"),
("stamen-terrain", "Stamen Terrain"),
(
"stadia-osm-bright",
"Stadia OSM Bright (vyžaduje API klíč)",
),
("stadia-outdoors", "Stadia Outdoors (vyžaduje API klíč)"),
],
default="osm-mapnik",
max_length=50,
verbose_name="Styl mapy",
),
),
(
"map_title",
models.TextField(
blank=True, null=True, verbose_name="Titulek mapy"
),
),
(
"category_list_title",
models.TextField(
blank=True,
null=True,
verbose_name="Titulek přehledu dle kategorie",
),
),
(
"image",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
to="wagtailimages.image",
verbose_name="obrázek",
),
),
(
"search_image",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="wagtailimages.image",
verbose_name="Search image",
),
),
],
options={
"verbose_name": "Stránka s mapovou kolekcí",
},
bases=(
shared.models.SubpageMixin,
wagtailmetadata.models.WagtailImageMetadataMixin,
"wagtailcore.page",
models.Model,
),
),
migrations.AddField(
model_name="districtgeofeaturecollectioncategory",
name="page",
field=modelcluster.fields.ParentalKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="categories",
to="district.districtgeofeaturecollectionpage",
),
),
]
# Generated by Django 4.0.3 on 2022-05-01 10:04
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("district", "0062_districtgeofeaturecollectioncategory_and_more"),
]
operations = [
migrations.AlterField(
model_name="districtarticlepage",
name="content",
field=wagtail.fields.StreamField(
[
(
"text",
wagtail.blocks.RichTextBlock(
features=[
"h2",
"h3",
"h4",
"bold",
"italic",
"ol",
"embed",
"ul",
"link",
"document-link",
"image",
],
label="Textový editor",
),
),
(
"gallery",
wagtail.blocks.StructBlock(
[
(
"gallery_items",
wagtail.blocks.ListBlock(
wagtail.images.blocks.ImageChooserBlock(
label="obrázek", required=True
),
group="ostatní",
icon="image",
label="Galerie",
),
)
],
label="Galerie",
),
),
(
"youtube",
wagtail.blocks.StructBlock(
[
(
"poster_image",
wagtail.images.blocks.ImageChooserBlock(
help_text="Není třeba vyplňovat, náhled bude dohledán automaticky.",
label="Náhled videa (automatické pole)",
required=False,
),
),
(
"video_url",
wagtail.blocks.URLBlock(
help_text="Odkaz na YouTube video bude automaticky zkonvertován na ID videa a NEBUDE uložen.",
label="Odkaz na video",
required=False,
),
),
(
"video_id",
wagtail.blocks.CharBlock(
help_text="Není třeba vyplňovat, bude automaticky načteno z odkazu.",
label="ID videa (automatické pole)",
required=False,
),
),
],
label="YouTube video",
),
),
(
"map_point",
wagtail.blocks.StructBlock(
[
(
"lat",
wagtail.blocks.DecimalBlock(
help_text="Např. 50.04075",
label="Zeměpisná šířka",
),
),
(
"lon",
wagtail.blocks.DecimalBlock(
help_text="Např. 15.77659",
label="Zeměpisná délka",
),
),
(
"hex_color",
wagtail.blocks.CharBlock(
default="000000",
help_text="Zadejte barvu pomocí HEX notace (bez # na začátku).",
label="Barva špendlíku (HEX)",
),
),
(
"zoom",
wagtail.blocks.IntegerBlock(
default=15,
label="Výchozí zoom",
max_value=18,
min_value=1,
),
),
(
"style",
wagtail.blocks.ChoiceBlock(
choices=[
("osm-mapnik", "OSM Mapnik"),
("stamen-toner", "Stamen Toner"),
("stamen-terrain", "Stamen Terrain"),
(
"stadia-osm-bright",
"Stadia OSM Bright (vyžaduje API klíč)",
),
(
"stadia-outdoors",
"Stadia Outdoors (vyžaduje API klíč)",
),
],
label="Styl",
),
),
(
"height",
wagtail.blocks.IntegerBlock(
label="Výška v px",
max_value=1000,
min_value=100,
),
),
],
label="Špendlík na mapě",
),
),
(
"map_collection",
wagtail.blocks.StructBlock(
[
(
"lat",
wagtail.blocks.DecimalBlock(
help_text="Např. 50.04075",
label="Zeměpisná šířka",
),
),
(
"lon",
wagtail.blocks.DecimalBlock(
help_text="Např. 15.77659",
label="Zeměpisná délka",
),
),
(
"hex_color",
wagtail.blocks.CharBlock(
default="000000",
help_text="Zadejte barvu pomocí HEX notace (bez # na začátku).",
label="Barva špendlíku (HEX)",
),
),
(
"zoom",
wagtail.blocks.IntegerBlock(
default=15,
label="Výchozí zoom",
max_value=18,
min_value=1,
),
),
(
"style",
wagtail.blocks.ChoiceBlock(
choices=[
("osm-mapnik", "OSM Mapnik"),
("stamen-toner", "Stamen Toner"),
("stamen-terrain", "Stamen Terrain"),
(
"stadia-osm-bright",
"Stadia OSM Bright (vyžaduje API klíč)",
),
(
"stadia-outdoors",
"Stadia Outdoors (vyžaduje API klíč)",
),
],
label="Styl",
),
),
(
"height",
wagtail.blocks.IntegerBlock(
label="Výška v px",
max_value=1000,
min_value=100,
),
),
],
label="Mapová kolekce",
),
),
],
blank=True,
verbose_name="Článek",
),
),
]