0001_initial.py 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 wagtail.wagtailcore.blocks
  7. import wagtail.wagtailcore.fields
  8. class Migration(migrations.Migration):
  9. initial = True
  10. dependencies = [
  11. ('wagtailcore', '0032_add_bulk_delete_page_permission'),
  12. ('wagtailimages', '0017_reduce_focal_point_key_max_length'),
  13. ]
  14. operations = [
  15. migrations.CreateModel(
  16. name='BreadPage',
  17. fields=[
  18. ('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')),
  19. ('description', wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock())))),
  20. ],
  21. options={
  22. 'abstract': False,
  23. },
  24. bases=('wagtailcore.page',),
  25. ),
  26. migrations.CreateModel(
  27. name='BreadsIndexPage',
  28. fields=[
  29. ('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')),
  30. ],
  31. options={
  32. 'abstract': False,
  33. },
  34. bases=('wagtailcore.page',),
  35. ),
  36. migrations.CreateModel(
  37. name='BreadType',
  38. fields=[
  39. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  40. ('title', models.CharField(max_length=255)),
  41. ],
  42. options={
  43. 'verbose_name_plural': 'Bread types',
  44. },
  45. ),
  46. migrations.CreateModel(
  47. name='Country',
  48. fields=[
  49. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  50. ('title', models.CharField(max_length=100)),
  51. ],
  52. options={
  53. 'verbose_name_plural': 'Countries of Origin',
  54. },
  55. ),
  56. migrations.AddField(
  57. model_name='breadpage',
  58. name='bread_type',
  59. field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='breads.BreadType'),
  60. ),
  61. migrations.AddField(
  62. model_name='breadpage',
  63. name='image',
  64. 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'),
  65. ),
  66. migrations.AddField(
  67. model_name='breadpage',
  68. name='origin',
  69. field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='breads.Country'),
  70. ),
  71. ]