kopia lustrzana https://github.com/wagtail/bakerydemo
78 wiersze
3.0 KiB
Python
78 wiersze
3.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.10.5 on 2017-02-10 12:17
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import wagtail.wagtailcore.blocks
|
|
import wagtail.wagtailcore.fields
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('wagtailcore', '0032_add_bulk_delete_page_permission'),
|
|
('wagtailimages', '0017_reduce_focal_point_key_max_length'),
|
|
]
|
|
|
|
operations = [
|
|
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')),
|
|
('description', wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock())))),
|
|
],
|
|
options={
|
|
'abstract': False,
|
|
},
|
|
bases=('wagtailcore.page',),
|
|
),
|
|
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')),
|
|
],
|
|
options={
|
|
'abstract': False,
|
|
},
|
|
bases=('wagtailcore.page',),
|
|
),
|
|
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='origin',
|
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='breads.Country'),
|
|
),
|
|
]
|