0001_initial.py 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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.blocks
  8. import wagtail.fields
  9. import wagtail.embeds.blocks
  10. import wagtail.images.blocks
  11. class Migration(migrations.Migration):
  12. initial = True
  13. dependencies = [
  14. ('wagtailcore', '0032_add_bulk_delete_page_permission'),
  15. ('wagtailimages', '0018_remove_rendition_filter'),
  16. ]
  17. operations = [
  18. migrations.CreateModel(
  19. name='BreadIngredient',
  20. fields=[
  21. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  22. ('name', models.CharField(max_length=255)),
  23. ],
  24. options={
  25. 'verbose_name_plural': 'Bread ingredients',
  26. },
  27. ),
  28. migrations.CreateModel(
  29. name='BreadPage',
  30. fields=[
  31. ('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')),
  32. ('introduction', models.TextField(blank=True, help_text='Text to describe the page')),
  33. ('body', wagtail.fields.StreamField((('heading_block', wagtail.blocks.StructBlock((('heading_text', wagtail.blocks.CharBlock(classname='title', required=True)), ('size', wagtail.blocks.ChoiceBlock(blank=True, choices=[('', 'Select a header size'), ('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], required=False))))), ('paragraph_block', wagtail.blocks.RichTextBlock(icon='fa-paragraph', template='blocks/paragraph_block.html')), ('image_block', wagtail.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.blocks.CharBlock(required=False)), ('attribution', wagtail.blocks.CharBlock(required=False))))), ('block_quote', wagtail.blocks.StructBlock((('text', wagtail.blocks.TextBlock()), ('attribute_name', wagtail.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')),
  34. ],
  35. options={
  36. 'abstract': False,
  37. },
  38. bases=('wagtailcore.page', models.Model),
  39. ),
  40. migrations.CreateModel(
  41. name='BreadsIndexPage',
  42. fields=[
  43. ('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')),
  44. ('introduction', models.TextField(blank=True, help_text='Text to describe the page')),
  45. ('body', wagtail.fields.StreamField((('heading_block', wagtail.blocks.StructBlock((('heading_text', wagtail.blocks.CharBlock(classname='title', required=True)), ('size', wagtail.blocks.ChoiceBlock(blank=True, choices=[('', 'Select a header size'), ('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], required=False))))), ('paragraph_block', wagtail.blocks.RichTextBlock(icon='fa-paragraph', template='blocks/paragraph_block.html')), ('image_block', wagtail.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.blocks.CharBlock(required=False)), ('attribution', wagtail.blocks.CharBlock(required=False))))), ('block_quote', wagtail.blocks.StructBlock((('text', wagtail.blocks.TextBlock()), ('attribute_name', wagtail.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')),
  46. ('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')),
  47. ],
  48. options={
  49. 'abstract': False,
  50. },
  51. bases=('wagtailcore.page', models.Model),
  52. ),
  53. migrations.CreateModel(
  54. name='BreadType',
  55. fields=[
  56. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  57. ('title', models.CharField(max_length=255)),
  58. ],
  59. options={
  60. 'verbose_name_plural': 'Bread types',
  61. },
  62. ),
  63. migrations.CreateModel(
  64. name='Country',
  65. fields=[
  66. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  67. ('title', models.CharField(max_length=100)),
  68. ],
  69. options={
  70. 'verbose_name_plural': 'Countries of Origin',
  71. },
  72. ),
  73. migrations.AddField(
  74. model_name='breadpage',
  75. name='bread_type',
  76. field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='breads.BreadType'),
  77. ),
  78. migrations.AddField(
  79. model_name='breadpage',
  80. name='image',
  81. field=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'),
  82. ),
  83. migrations.AddField(
  84. model_name='breadpage',
  85. name='ingredients',
  86. field=modelcluster.fields.ParentalManyToManyField(blank=True, to='breads.BreadIngredient'),
  87. ),
  88. migrations.AddField(
  89. model_name='breadpage',
  90. name='origin',
  91. field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='breads.Country'),
  92. ),
  93. ]