0003_auto_20170329_0055.py 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # -*- coding: utf-8 -*-
  2. # Generated by Django 1.10.5 on 2017-03-29 00:55
  3. from __future__ import unicode_literals
  4. from django.db import migrations
  5. import wagtail.blocks
  6. import wagtail.fields
  7. import wagtail.embeds.blocks
  8. import wagtail.images.blocks
  9. class Migration(migrations.Migration):
  10. dependencies = [
  11. ("breads", "0002_remove_breadsindexpage_body"),
  12. ]
  13. operations = [
  14. migrations.AlterField(
  15. model_name="breadpage",
  16. name="body",
  17. field=wagtail.fields.StreamField(
  18. (
  19. (
  20. "heading_block",
  21. wagtail.blocks.StructBlock(
  22. (
  23. (
  24. "heading_text",
  25. wagtail.blocks.CharBlock(
  26. classname="title", required=True
  27. ),
  28. ),
  29. (
  30. "size",
  31. wagtail.blocks.ChoiceBlock(
  32. blank=True,
  33. choices=[
  34. ("", "Select a header size"),
  35. ("h2", "H2"),
  36. ("h3", "H3"),
  37. ("h4", "H4"),
  38. ],
  39. required=False,
  40. ),
  41. ),
  42. )
  43. ),
  44. ),
  45. (
  46. "paragraph_block",
  47. wagtail.blocks.RichTextBlock(
  48. icon="pilcrow", template="blocks/paragraph_block.html"
  49. ),
  50. ),
  51. (
  52. "image_block",
  53. wagtail.blocks.StructBlock(
  54. (
  55. (
  56. "image",
  57. wagtail.images.blocks.ImageChooserBlock(
  58. required=True
  59. ),
  60. ),
  61. ("caption", wagtail.blocks.CharBlock(required=False)),
  62. (
  63. "attribution",
  64. wagtail.blocks.CharBlock(required=False),
  65. ),
  66. )
  67. ),
  68. ),
  69. (
  70. "block_quote",
  71. wagtail.blocks.StructBlock(
  72. (
  73. ("text", wagtail.blocks.TextBlock()),
  74. (
  75. "attribute_name",
  76. wagtail.blocks.CharBlock(
  77. blank=True,
  78. label="e.g. Mary Berry",
  79. required=False,
  80. ),
  81. ),
  82. )
  83. ),
  84. ),
  85. (
  86. "embed_block",
  87. wagtail.embeds.blocks.EmbedBlock(
  88. help_text="Insert an embed URL e.g https://www.youtube.com/watch?v=SGJFWirQ3ks",
  89. icon="media",
  90. template="blocks/embed_block.html",
  91. ),
  92. ),
  93. ),
  94. blank=True,
  95. verbose_name="Page body",
  96. ),
  97. ),
  98. ]