0001_initial.py 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # -*- coding: utf-8 -*-
  2. # Generated by Django 1.10.5 on 2017-02-09 16:05
  3. from __future__ import unicode_literals
  4. from django.db import migrations, models
  5. import django.db.models.deletion
  6. import modelcluster.fields
  7. class Migration(migrations.Migration):
  8. initial = True
  9. dependencies = [
  10. ('wagtailimages', '0017_reduce_focal_point_key_max_length'),
  11. ('wagtailcore', '0032_add_bulk_delete_page_permission'),
  12. ]
  13. operations = [
  14. migrations.CreateModel(
  15. name='LocationOperatingHours',
  16. fields=[
  17. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  18. ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
  19. ('day', models.CharField(choices=[('MON', 'MON'), ('TUE', 'TUE'), ('WED', 'WED'), ('THU', 'THU'), ('FRI', 'FRI'), ('SAT', 'SAT'), ('SUN', 'SUN')], default='MON', max_length=3)),
  20. ('opening_time', models.TimeField()),
  21. ('closing_time', models.TimeField()),
  22. ],
  23. options={
  24. 'abstract': False,
  25. 'ordering': ['sort_order'],
  26. },
  27. ),
  28. migrations.CreateModel(
  29. name='LocationPage',
  30. fields=[
  31. ('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')),
  32. ('address', models.TextField()),
  33. ('lat_long', models.CharField(max_length=36)),
  34. ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image')),
  35. ],
  36. options={
  37. 'abstract': False,
  38. },
  39. bases=('wagtailcore.page',),
  40. ),
  41. migrations.CreateModel(
  42. name='LocationsLandingPage',
  43. fields=[
  44. ('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')),
  45. ],
  46. options={
  47. 'abstract': False,
  48. },
  49. bases=('wagtailcore.page',),
  50. ),
  51. migrations.AddField(
  52. model_name='locationoperatinghours',
  53. name='location',
  54. field=modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='hours_of_operation', to='locations.LocationPage'),
  55. ),
  56. ]