2
0

0001_initial.py 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. # -*- coding: utf-8 -*-
  2. # Generated by Django 1.10.5 on 2017-03-15 07:16
  3. from __future__ import unicode_literals
  4. from django.db import migrations, models
  5. import django.db.models.deletion
  6. import modelcluster.fields
  7. import wagtail.core.blocks
  8. import wagtail.core.fields
  9. import wagtail.embeds.blocks
  10. import wagtail.images.blocks
  11. class Migration(migrations.Migration):
  12. initial = True
  13. dependencies = [
  14. ('wagtailimages', '0018_remove_rendition_filter'),
  15. ('wagtailcore', '0032_add_bulk_delete_page_permission'),
  16. ]
  17. operations = [
  18. migrations.CreateModel(
  19. name='FooterText',
  20. fields=[
  21. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  22. ('body', wagtail.core.fields.RichTextField()),
  23. ],
  24. options={
  25. 'verbose_name_plural': 'Footer Text',
  26. },
  27. ),
  28. migrations.CreateModel(
  29. name='FormField',
  30. fields=[
  31. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  32. ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
  33. ('label', models.CharField(help_text='The label of the form field', max_length=255, verbose_name='label')),
  34. ('field_type', models.CharField(choices=[('singleline', 'Single line text'), ('multiline', 'Multi-line text'), ('email', 'Email'), ('number', 'Number'), ('url', 'URL'), ('checkbox', 'Checkbox'), ('checkboxes', 'Checkboxes'), ('dropdown', 'Drop down'), ('radio', 'Radio buttons'), ('date', 'Date'), ('datetime', 'Date/time')], max_length=16, verbose_name='field type')),
  35. ('required', models.BooleanField(default=True, verbose_name='required')),
  36. ('choices', models.TextField(blank=True, help_text='Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.', verbose_name='choices')),
  37. ('default_value', models.CharField(blank=True, help_text='Default value. Comma separated values supported for checkboxes.', max_length=255, verbose_name='default value')),
  38. ('help_text', models.CharField(blank=True, max_length=255, verbose_name='help text')),
  39. ],
  40. options={
  41. 'ordering': ['sort_order'],
  42. 'abstract': False,
  43. },
  44. ),
  45. migrations.CreateModel(
  46. name='FormPage',
  47. fields=[
  48. ('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')),
  49. ('to_address', models.CharField(blank=True, help_text='Optional - form submissions will be emailed to these addresses. Separate multiple addresses by comma.', max_length=255, verbose_name='to address')),
  50. ('from_address', models.CharField(blank=True, max_length=255, verbose_name='from address')),
  51. ('subject', models.CharField(blank=True, max_length=255, verbose_name='subject')),
  52. ('body', wagtail.core.fields.StreamField((('heading_block', wagtail.core.blocks.StructBlock((('heading_text', wagtail.core.blocks.CharBlock(classname='title', required=True)), ('size', wagtail.core.blocks.ChoiceBlock(blank=True, choices=[('', 'Select a header size'), ('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], required=False))))), ('paragraph_block', wagtail.core.blocks.RichTextBlock(icon='fa-paragraph', template='blocks/paragraph_block.html')), ('image_block', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('attribution', wagtail.core.blocks.CharBlock(required=False))))), ('block_quote', wagtail.core.blocks.StructBlock((('text', wagtail.core.blocks.TextBlock()), ('attribute_name', wagtail.core.blocks.CharBlock(blank=True, label='e.g. Guy Picciotto', required=False))))), ('embed_block', wagtail.embeds.blocks.EmbedBlock(help_text='Insert an embed URL e.g https://www.youtube.com/embed/SGJFWirQ3ks', icon='fa-s15', template='blocks/embed_block.html'))))),
  53. ('thank_you_text', wagtail.core.fields.RichTextField(blank=True)),
  54. ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image')),
  55. ],
  56. options={
  57. 'abstract': False,
  58. },
  59. bases=('wagtailcore.page',),
  60. ),
  61. migrations.CreateModel(
  62. name='GalleryPage',
  63. fields=[
  64. ('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')),
  65. ('introduction', models.TextField(blank=True, help_text='Text to describe the page')),
  66. ('body', wagtail.core.fields.StreamField((('heading_block', wagtail.core.blocks.StructBlock((('heading_text', wagtail.core.blocks.CharBlock(classname='title', required=True)), ('size', wagtail.core.blocks.ChoiceBlock(blank=True, choices=[('', 'Select a header size'), ('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], required=False))))), ('paragraph_block', wagtail.core.blocks.RichTextBlock(icon='fa-paragraph', template='blocks/paragraph_block.html')), ('image_block', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('attribution', wagtail.core.blocks.CharBlock(required=False))))), ('block_quote', wagtail.core.blocks.StructBlock((('text', wagtail.core.blocks.TextBlock()), ('attribute_name', wagtail.core.blocks.CharBlock(blank=True, label='e.g. Guy Picciotto', required=False))))), ('embed_block', wagtail.embeds.blocks.EmbedBlock(help_text='Insert an embed URL e.g https://www.youtube.com/embed/SGJFWirQ3ks', icon='fa-s15', template='blocks/embed_block.html'))), blank=True, verbose_name='Page body')),
  67. ('collection', models.ForeignKey(blank=True, help_text='Select the image collection for this gallery.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wagtailcore.Collection')),
  68. ('image', models.ForeignKey(blank=True, help_text='Landscape mode only; horizontal width between 1000px and 3000px.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image')),
  69. ],
  70. options={
  71. 'abstract': False,
  72. },
  73. bases=('wagtailcore.page', models.Model),
  74. ),
  75. migrations.CreateModel(
  76. name='HomePage',
  77. fields=[
  78. ('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')),
  79. ('hero_text', models.CharField(help_text='Write an introduction for the bakery', max_length=255)),
  80. ('hero_cta', models.CharField(help_text='Text to display on Call to Action', max_length=255, verbose_name='Hero CTA')),
  81. ('body', wagtail.core.fields.StreamField((('heading_block', wagtail.core.blocks.StructBlock((('heading_text', wagtail.core.blocks.CharBlock(classname='title', required=True)), ('size', wagtail.core.blocks.ChoiceBlock(blank=True, choices=[('', 'Select a header size'), ('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], required=False))))), ('paragraph_block', wagtail.core.blocks.RichTextBlock(icon='fa-paragraph', template='blocks/paragraph_block.html')), ('image_block', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('attribution', wagtail.core.blocks.CharBlock(required=False))))), ('block_quote', wagtail.core.blocks.StructBlock((('text', wagtail.core.blocks.TextBlock()), ('attribute_name', wagtail.core.blocks.CharBlock(blank=True, label='e.g. Guy Picciotto', required=False))))), ('embed_block', wagtail.embeds.blocks.EmbedBlock(help_text='Insert an embed URL e.g https://www.youtube.com/embed/SGJFWirQ3ks', icon='fa-s15', template='blocks/embed_block.html'))), blank=True, verbose_name='Home content block')),
  82. ('promo_title', models.CharField(blank=True, help_text='Title to display above the promo copy', max_length=255, null=True)),
  83. ('promo_text', wagtail.core.fields.RichTextField(blank=True, help_text='Write some promotional copy', null=True)),
  84. ('featured_section_1_title', models.CharField(blank=True, help_text='Title to display above the promo copy', max_length=255, null=True)),
  85. ('featured_section_2_title', models.CharField(blank=True, help_text='Title to display above the promo copy', max_length=255, null=True)),
  86. ('featured_section_3_title', models.CharField(blank=True, help_text='Title to display above the promo copy', max_length=255, null=True)),
  87. ],
  88. options={
  89. 'abstract': False,
  90. },
  91. bases=('wagtailcore.page',),
  92. ),
  93. migrations.CreateModel(
  94. name='People',
  95. fields=[
  96. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  97. ('first_name', models.CharField(max_length=254, verbose_name='First name')),
  98. ('last_name', models.CharField(max_length=254, verbose_name='Last name')),
  99. ('job_title', models.CharField(max_length=254, verbose_name='Job title')),
  100. ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image')),
  101. ],
  102. options={
  103. 'verbose_name_plural': 'People',
  104. 'verbose_name': 'Person',
  105. },
  106. ),
  107. migrations.CreateModel(
  108. name='StandardPage',
  109. fields=[
  110. ('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')),
  111. ('introduction', models.TextField(blank=True, help_text='Text to describe the page')),
  112. ('body', wagtail.core.fields.StreamField((('heading_block', wagtail.core.blocks.StructBlock((('heading_text', wagtail.core.blocks.CharBlock(classname='title', required=True)), ('size', wagtail.core.blocks.ChoiceBlock(blank=True, choices=[('', 'Select a header size'), ('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], required=False))))), ('paragraph_block', wagtail.core.blocks.RichTextBlock(icon='fa-paragraph', template='blocks/paragraph_block.html')), ('image_block', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('attribution', wagtail.core.blocks.CharBlock(required=False))))), ('block_quote', wagtail.core.blocks.StructBlock((('text', wagtail.core.blocks.TextBlock()), ('attribute_name', wagtail.core.blocks.CharBlock(blank=True, label='e.g. Guy Picciotto', required=False))))), ('embed_block', wagtail.embeds.blocks.EmbedBlock(help_text='Insert an embed URL e.g https://www.youtube.com/embed/SGJFWirQ3ks', icon='fa-s15', template='blocks/embed_block.html'))), blank=True, verbose_name='Page body')),
  113. ('image', models.ForeignKey(blank=True, help_text='Landscape mode only; horizontal width between 1000px and 3000px.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image')),
  114. ],
  115. options={
  116. 'abstract': False,
  117. },
  118. bases=('wagtailcore.page', models.Model),
  119. ),
  120. migrations.AddField(
  121. model_name='homepage',
  122. name='featured_section_1',
  123. field=models.ForeignKey(blank=True, help_text='First featured section for the homepage. Will display up to three child items.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailcore.Page', verbose_name='Featured section 1'),
  124. ),
  125. migrations.AddField(
  126. model_name='homepage',
  127. name='featured_section_2',
  128. field=models.ForeignKey(blank=True, help_text='Second featured section for the homepage. Will display up to three child items.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailcore.Page', verbose_name='Featured section 2'),
  129. ),
  130. migrations.AddField(
  131. model_name='homepage',
  132. name='featured_section_3',
  133. field=models.ForeignKey(blank=True, help_text='Third featured section for the homepage. Will display up to six child items.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailcore.Page', verbose_name='Featured section 3'),
  134. ),
  135. migrations.AddField(
  136. model_name='homepage',
  137. name='hero_cta_link',
  138. field=models.ForeignKey(blank=True, help_text='Choose a page to link to for the Call to Action', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailcore.Page', verbose_name='Hero CTA link'),
  139. ),
  140. migrations.AddField(
  141. model_name='homepage',
  142. name='image',
  143. field=models.ForeignKey(blank=True, help_text='Homepage image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image'),
  144. ),
  145. migrations.AddField(
  146. model_name='homepage',
  147. name='promo_image',
  148. field=models.ForeignKey(blank=True, help_text='Promo image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image'),
  149. ),
  150. migrations.AddField(
  151. model_name='formfield',
  152. name='page',
  153. field=modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='form_fields', to='base.FormPage'),
  154. ),
  155. ]