|
@@ -0,0 +1,81 @@
|
|
|
+# -*- coding: utf-8 -*-
|
|
|
+# Generated by Django 1.10.5 on 2017-02-09 16:51
|
|
|
+from __future__ import unicode_literals
|
|
|
+
|
|
|
+from django.db import migrations, models
|
|
|
+import django.db.models.deletion
|
|
|
+import modelcluster.contrib.taggit
|
|
|
+import modelcluster.fields
|
|
|
+import wagtail.wagtailcore.blocks
|
|
|
+import wagtail.wagtailcore.fields
|
|
|
+import wagtail.wagtailembeds.blocks
|
|
|
+import wagtail.wagtailimages.blocks
|
|
|
+
|
|
|
+
|
|
|
+class Migration(migrations.Migration):
|
|
|
+
|
|
|
+ initial = True
|
|
|
+
|
|
|
+ dependencies = [
|
|
|
+ ('wagtailcore', '0032_add_bulk_delete_page_permission'),
|
|
|
+ ('wagtailimages', '0017_reduce_focal_point_key_max_length'),
|
|
|
+ ('taggit', '0002_auto_20150616_2121'),
|
|
|
+ ('base', '0003_auto_20170209_1651'),
|
|
|
+ ]
|
|
|
+
|
|
|
+ operations = [
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='BlogIndexPage',
|
|
|
+ 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 index page')),
|
|
|
+ ('image', models.ForeignKey(blank=True, help_text='Location listing image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image')),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'abstract': False,
|
|
|
+ },
|
|
|
+ bases=('wagtailcore.page',),
|
|
|
+ ),
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='BlogPage',
|
|
|
+ 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')),
|
|
|
+ ('date_published', models.DateField(blank=True, null=True, verbose_name='Date article published')),
|
|
|
+ ('body', wagtail.wagtailcore.fields.StreamField((('heading_block', wagtail.wagtailcore.blocks.StructBlock((('heading_text', wagtail.wagtailcore.blocks.CharBlock(classname='title', required=True)), ('size', wagtail.wagtailcore.blocks.ChoiceBlock(blank=True, choices=[('', 'Select a header size'), ('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], required=False))))), ('paragraph_block', wagtail.wagtailcore.blocks.RichTextBlock(icon='fa-paragraph', template='blocks/paragraph_block.html')), ('image_block', wagtail.wagtailcore.blocks.StructBlock((('image', wagtail.wagtailimages.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.wagtailcore.blocks.CharBlock(required=False)), ('attribution', wagtail.wagtailcore.blocks.CharBlock(required=False))))), ('block_quote', wagtail.wagtailcore.blocks.StructBlock((('attribute_name', wagtail.wagtailcore.blocks.CharBlock(blank=True, label='e.g. Guy Picciotto', required=False)),))), ('embed_block', wagtail.wagtailembeds.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='About page detail')),
|
|
|
+ ('image', models.ForeignKey(blank=True, help_text='Location image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image')),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'abstract': False,
|
|
|
+ },
|
|
|
+ bases=('wagtailcore.page',),
|
|
|
+ ),
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='BlogPageTag',
|
|
|
+ fields=[
|
|
|
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
+ ('content_object', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='tagged_items', to='blog.BlogPage')),
|
|
|
+ ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='blog_blogpagetag_items', to='taggit.Tag')),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'abstract': False,
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='BlogPeopleRelationship',
|
|
|
+ fields=[
|
|
|
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
+ ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
|
|
|
+ ('blogpage', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='blog_person_relationship', to='blog.BlogPage')),
|
|
|
+ ('people', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='person_blog_relationship', to='base.People')),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'abstract': False,
|
|
|
+ 'ordering': ['sort_order'],
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ migrations.AddField(
|
|
|
+ model_name='blogpage',
|
|
|
+ name='tags',
|
|
|
+ field=modelcluster.contrib.taggit.ClusterTaggableManager(blank=True, help_text='A comma-separated list of tags.', through='blog.BlogPageTag', to='taggit.Tag', verbose_name='Tags'),
|
|
|
+ ),
|
|
|
+ ]
|