0001_initial.py 5.0 KB

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