0003_auto_20170329_0055.py 3.8 KB

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