0001_initial.py 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # -*- coding: utf-8 -*-
  2. # Generated by Django 1.10.5 on 2017-02-09 16:51
  3. from __future__ import unicode_literals
  4. from django.db import migrations, models
  5. import django.db.models.deletion
  6. import modelcluster.contrib.taggit
  7. import modelcluster.fields
  8. import wagtail.wagtailcore.blocks
  9. import wagtail.wagtailcore.fields
  10. import wagtail.wagtailembeds.blocks
  11. import wagtail.wagtailimages.blocks
  12. class Migration(migrations.Migration):
  13. initial = True
  14. dependencies = [
  15. ('wagtailcore', '0032_add_bulk_delete_page_permission'),
  16. ('wagtailimages', '0017_reduce_focal_point_key_max_length'),
  17. ('taggit', '0002_auto_20150616_2121'),
  18. ('base', '0003_auto_20170209_1651'),
  19. ]
  20. operations = [
  21. migrations.CreateModel(
  22. name='BlogIndexPage',
  23. fields=[
  24. ('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')),
  25. ('introduction', models.TextField(blank=True, help_text='Text to describe the index page')),
  26. ('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')),
  27. ],
  28. options={
  29. 'abstract': False,
  30. },
  31. bases=('wagtailcore.page',),
  32. ),
  33. migrations.CreateModel(
  34. name='BlogPage',
  35. fields=[
  36. ('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')),
  37. ('date_published', models.DateField(blank=True, null=True, verbose_name='Date article published')),
  38. ('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')),
  39. ('image', models.ForeignKey(blank=True, help_text='Location image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image')),
  40. ],
  41. options={
  42. 'abstract': False,
  43. },
  44. bases=('wagtailcore.page',),
  45. ),
  46. migrations.CreateModel(
  47. name='BlogPageTag',
  48. fields=[
  49. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  50. ('content_object', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='tagged_items', to='blog.BlogPage')),
  51. ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='blog_blogpagetag_items', to='taggit.Tag')),
  52. ],
  53. options={
  54. 'abstract': False,
  55. },
  56. ),
  57. migrations.CreateModel(
  58. name='BlogPeopleRelationship',
  59. fields=[
  60. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  61. ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
  62. ('blogpage', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='blog_person_relationship', to='blog.BlogPage')),
  63. ('people', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='person_blog_relationship', to='base.People')),
  64. ],
  65. options={
  66. 'abstract': False,
  67. 'ordering': ['sort_order'],
  68. },
  69. ),
  70. migrations.AddField(
  71. model_name='blogpage',
  72. name='tags',
  73. field=modelcluster.contrib.taggit.ClusterTaggableManager(blank=True, help_text='A comma-separated list of tags.', through='blog.BlogPageTag', to='taggit.Tag', verbose_name='Tags'),
  74. ),
  75. ]