123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351 |
- # -*- coding: utf-8 -*-
- # Generated by Django 1.10.5 on 2017-03-15 07:16
- from __future__ import unicode_literals
- from django.db import migrations, models
- import django.db.models.deletion
- import modelcluster.fields
- import wagtail.blocks
- import wagtail.fields
- import wagtail.embeds.blocks
- import wagtail.images.blocks
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- ("wagtailcore", "0032_add_bulk_delete_page_permission"),
- ("wagtailimages", "0018_remove_rendition_filter"),
- ]
- operations = [
- migrations.CreateModel(
- name="BreadIngredient",
- fields=[
- (
- "id",
- models.AutoField(
- auto_created=True,
- primary_key=True,
- serialize=False,
- verbose_name="ID",
- ),
- ),
- ("name", models.CharField(max_length=255)),
- ],
- options={
- "verbose_name_plural": "Bread ingredients",
- },
- ),
- migrations.CreateModel(
- name="BreadPage",
- 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",
- ),
- ),
- (
- "introduction",
- models.TextField(blank=True, help_text="Text to describe the page"),
- ),
- (
- "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="pilcrow",
- 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/watch?v=SGJFWirQ3ks",
- icon="media",
- template="blocks/embed_block.html",
- ),
- ),
- ),
- blank=True,
- verbose_name="Page body",
- ),
- ),
- ],
- options={
- "abstract": False,
- },
- bases=("wagtailcore.page", models.Model),
- ),
- migrations.CreateModel(
- name="BreadsIndexPage",
- 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",
- ),
- ),
- (
- "introduction",
- models.TextField(blank=True, help_text="Text to describe the page"),
- ),
- (
- "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="pilcrow",
- 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/watch?v=SGJFWirQ3ks",
- icon="media",
- template="blocks/embed_block.html",
- ),
- ),
- ),
- blank=True,
- verbose_name="Page body",
- ),
- ),
- (
- "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",
- ),
- ),
- ],
- options={
- "abstract": False,
- },
- bases=("wagtailcore.page", models.Model),
- ),
- migrations.CreateModel(
- name="BreadType",
- fields=[
- (
- "id",
- models.AutoField(
- auto_created=True,
- primary_key=True,
- serialize=False,
- verbose_name="ID",
- ),
- ),
- ("title", models.CharField(max_length=255)),
- ],
- options={
- "verbose_name_plural": "Bread types",
- },
- ),
- migrations.CreateModel(
- name="Country",
- fields=[
- (
- "id",
- models.AutoField(
- auto_created=True,
- primary_key=True,
- serialize=False,
- verbose_name="ID",
- ),
- ),
- ("title", models.CharField(max_length=100)),
- ],
- options={
- "verbose_name_plural": "Countries of Origin",
- },
- ),
- migrations.AddField(
- model_name="breadpage",
- name="bread_type",
- field=models.ForeignKey(
- blank=True,
- null=True,
- on_delete=django.db.models.deletion.SET_NULL,
- related_name="+",
- to="breads.BreadType",
- ),
- ),
- migrations.AddField(
- model_name="breadpage",
- name="image",
- 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",
- ),
- ),
- migrations.AddField(
- model_name="breadpage",
- name="ingredients",
- field=modelcluster.fields.ParentalManyToManyField(
- blank=True, to="breads.BreadIngredient"
- ),
- ),
- migrations.AddField(
- model_name="breadpage",
- name="origin",
- field=models.ForeignKey(
- blank=True,
- null=True,
- on_delete=django.db.models.deletion.SET_NULL,
- to="breads.Country",
- ),
- ),
- ]
|