text: # Generated by Django 3.2.13 on 2022-04-30 08:18
  
  import datetime
  import django.core.validators
  from django.db import migrations, models
  import django.db.models.deletion
  import ls.joyous.fields
  import ls.joyous.models.event_base
  import ls.joyous.utils.mixins
  import modelcluster.fields
  import timezone_field.fields
  import uuid
  import wagtail.contrib.routable_page.models
  import wagtail.core.fields
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('wagtailcore', '0066_collection_management_permissions'),
          ('wagtailimages', '0023_add_choose_permissions'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='CalendarPage',
              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')),
                  ('intro', wagtail.core.fields.RichTextField(blank=True, help_text='Introductory text.', verbose_name='intro')),
                  ('view_choices', ls.joyous.fields.MultipleSelectField(blank=True, choices=[('L', 'List View'), ('W', 'Weekly View'), ('M', 'Monthly View')], default=['L', 'W', 'M'], verbose_name='view choices')),
                  ('default_view', models.CharField(choices=[('L', 'List View'), ('W', 'Weekly View'), ('M', 'Monthly View')], default='M', max_length=15, verbose_name='default view')),
              ],
              options={
                  'verbose_name': 'calendar page',
                  'verbose_name_plural': 'calendar pages',
              },
              bases=(wagtail.contrib.routable_page.models.RoutablePageMixin, 'wagtailcore.page'),
          ),
          migrations.CreateModel(
              name='EventCategory',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('code', models.CharField(max_length=4, unique=True, verbose_name='code')),
                  ('name', models.CharField(max_length=80, verbose_name='name')),
              ],
              options={
                  'verbose_name': 'event category',
                  'verbose_name_plural': 'event categories',
                  'ordering': ['name'],
              },
          ),
          migrations.CreateModel(
              name='GroupPage',
              fields=[
                  ('page_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='joyous_grouppage', serialize=False, to='wagtailcore.page')),
                  ('content', wagtail.core.fields.RichTextField(blank=True, default='', help_text='An area of text for whatever you like', verbose_name='content')),
              ],
              options={
                  'verbose_name': 'group page',
                  'verbose_name_plural': 'group pages',
              },
              bases=('wagtailcore.page',),
          ),
          migrations.CreateModel(
              name='SimpleEventPage',
              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')),
                  ('uid', models.CharField(db_index=True, default=uuid.uuid4, editable=False, max_length=255)),
                  ('time_from', models.TimeField(blank=True, null=True, verbose_name='start time')),
                  ('time_to', models.TimeField(blank=True, null=True, verbose_name='end time')),
                  ('tz', timezone_field.fields.TimeZoneField(default=ls.joyous.models.event_base._get_default_timezone, verbose_name='time zone')),
                  ('details', wagtail.core.fields.RichTextField(blank=True, verbose_name='details')),
                  ('location', models.CharField(blank=True, max_length=255, verbose_name='location')),
                  ('website', models.URLField(blank=True, verbose_name='website')),
                  ('date', models.DateField(default=datetime.date.today, verbose_name='date')),
                  ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='joyous.eventcategory', verbose_name='category')),
                  ('group_page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='joyous.grouppage', verbose_name='group page')),
                  ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image', verbose_name='image')),
              ],
              options={
                  'verbose_name': 'event page',
                  'verbose_name_plural': 'event pages',
                  'default_manager_name': 'objects',
              },
              bases=('wagtailcore.page', models.Model),
          ),
          migrations.CreateModel(
              name='RecurringEventPage',
              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')),
                  ('uid', models.CharField(db_index=True, default=uuid.uuid4, editable=False, max_length=255)),
                  ('time_from', models.TimeField(blank=True, null=True, verbose_name='start time')),
                  ('time_to', models.TimeField(blank=True, null=True, verbose_name='end time')),
                  ('tz', timezone_field.fields.TimeZoneField(default=ls.joyous.models.event_base._get_default_timezone, verbose_name='time zone')),
                  ('details', wagtail.core.fields.RichTextField(blank=True, verbose_name='details')),
                  ('location', models.CharField(blank=True, max_length=255, verbose_name='location')),
                  ('website', models.URLField(blank=True, verbose_name='website')),
                  ('repeat', ls.joyous.fields.RecurrenceField(verbose_name='repeat')),
                  ('num_days', models.IntegerField(default=1, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(99)], verbose_name='number of days')),
                  ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='joyous.eventcategory', verbose_name='category')),
                  ('group_page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='joyous.grouppage', verbose_name='group page')),
                  ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image', verbose_name='image')),
              ],
              options={
                  'verbose_name': 'recurring event page',
                  'verbose_name_plural': 'recurring event pages',
                  'default_manager_name': 'objects',
              },
              bases=('wagtailcore.page', models.Model),
          ),
          migrations.CreateModel(
              name='MultidayEventPage',
              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')),
                  ('uid', models.CharField(db_index=True, default=uuid.uuid4, editable=False, max_length=255)),
                  ('time_from', models.TimeField(blank=True, null=True, verbose_name='start time')),
                  ('time_to', models.TimeField(blank=True, null=True, verbose_name='end time')),
                  ('tz', timezone_field.fields.TimeZoneField(default=ls.joyous.models.event_base._get_default_timezone, verbose_name='time zone')),
                  ('details', wagtail.core.fields.RichTextField(blank=True, verbose_name='details')),
                  ('location', models.CharField(blank=True, max_length=255, verbose_name='location')),
                  ('website', models.URLField(blank=True, verbose_name='website')),
                  ('date_from', models.DateField(default=datetime.date.today, verbose_name='start date')),
                  ('date_to', models.DateField(default=datetime.date.today, verbose_name='end date')),
                  ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='joyous.eventcategory', verbose_name='category')),
                  ('group_page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='joyous.grouppage', verbose_name='group page')),
                  ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image', verbose_name='image')),
              ],
              options={
                  'verbose_name': 'multiday event page',
                  'verbose_name_plural': 'multiday event pages',
                  'default_manager_name': 'objects',
              },
              bases=('wagtailcore.page', models.Model),
          ),
          migrations.CreateModel(
              name='ExtraInfoPage',
              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')),
                  ('except_date', models.DateField(help_text='For this date', verbose_name='For Date')),
                  ('extra_title', models.CharField(blank=True, help_text='A more specific title for this occurence (optional)', max_length=255, verbose_name='title')),
                  ('extra_information', wagtail.core.fields.RichTextField(blank=True, help_text='Information just for this date', verbose_name='extra information')),
                  ('overrides', models.ForeignKey(help_text='The recurring event that we are updating.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='joyous.recurringeventpage', verbose_name='overrides')),
              ],
              options={
                  'verbose_name': 'extra event information',
                  'verbose_name_plural': 'extra event information',
                  'default_manager_name': 'objects',
              },
              bases=('wagtailcore.page', models.Model),
          ),
          migrations.CreateModel(
              name='ExtCancellationPage',
              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')),
                  ('cancellation_title', models.CharField(blank=True, help_text='Show in place of cancelled event (Leave empty to show nothing)', max_length=255, verbose_name='title')),
                  ('cancellation_details', wagtail.core.fields.RichTextField(blank=True, help_text='Why was the event cancelled?', verbose_name='details')),
                  ('cancelled_from_date', models.DateField(help_text='Cancelled from this date', verbose_name='From Date')),
                  ('cancelled_to_date', models.DateField(blank=True, help_text='Cancelled to this date (Leave empty for "until further notice")', null=True, verbose_name='To Date')),
                  ('overrides', models.ForeignKey(help_text='The recurring event that we are updating.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='joyous.recurringeventpage', verbose_name='overrides')),
              ],
              options={
                  'verbose_name': 'extended cancellation',
                  'verbose_name_plural': 'extended cancellations',
                  'default_manager_name': 'objects',
              },
              bases=('wagtailcore.page', models.Model),
          ),
          migrations.CreateModel(
              name='ClosedForHolidaysPage',
              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')),
                  ('cancellation_title', models.CharField(blank=True, help_text='Show in place of cancelled event (Leave empty to show nothing)', max_length=255, verbose_name='title')),
                  ('cancellation_details', wagtail.core.fields.RichTextField(blank=True, help_text='Why was the event cancelled?', verbose_name='details')),
                  ('all_holidays', models.BooleanField(default=True, help_text='Cancel any occurence of this event on a public holiday')),
                  ('overrides', models.ForeignKey(help_text='The recurring event that we are updating.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='joyous.recurringeventpage', verbose_name='overrides')),
              ],
              options={
                  'verbose_name': 'closed for holidays',
                  'verbose_name_plural': 'closed for holidays',
                  'default_manager_name': 'objects',
              },
              bases=('wagtailcore.page', models.Model),
          ),
          migrations.CreateModel(
              name='CancellationPage',
              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')),
                  ('except_date', models.DateField(help_text='For this date', verbose_name='For Date')),
                  ('cancellation_title', models.CharField(blank=True, help_text='Show in place of cancelled event (Leave empty to show nothing)', max_length=255, verbose_name='title')),
                  ('cancellation_details', wagtail.core.fields.RichTextField(blank=True, help_text='Why was the event cancelled?', verbose_name='details')),
                  ('overrides', models.ForeignKey(help_text='The recurring event that we are updating.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='joyous.recurringeventpage', verbose_name='overrides')),
              ],
              options={
                  'verbose_name': 'cancellation',
                  'verbose_name_plural': 'cancellations',
                  'default_manager_name': 'objects',
              },
              bases=('wagtailcore.page', models.Model),
          ),
          migrations.CreateModel(
              name='GeneralCalendarPage',
              fields=[
              ],
              options={
                  'verbose_name': 'general calendar page',
                  'verbose_name_plural': 'general calendar pages',
                  'proxy': True,
                  'indexes': [],
                  'constraints': [],
              },
              bases=(ls.joyous.utils.mixins.ProxyPageMixin, 'joyous.calendarpage'),
          ),
          migrations.CreateModel(
              name='MultidayRecurringEventPage',
              fields=[
              ],
              options={
                  'verbose_name': 'multiday recurring event page',
                  'verbose_name_plural': 'multiday recurring event pages',
                  'proxy': True,
                  'indexes': [],
                  'constraints': [],
              },
              bases=(ls.joyous.utils.mixins.ProxyPageMixin, 'joyous.recurringeventpage'),
          ),
          migrations.CreateModel(
              name='SpecificCalendarPage',
              fields=[
              ],
              options={
                  'verbose_name': 'specific calendar page',
                  'verbose_name_plural': 'specific calendar pages',
                  'proxy': True,
                  'indexes': [],
                  'constraints': [],
              },
              bases=(ls.joyous.utils.mixins.ProxyPageMixin, 'joyous.calendarpage'),
          ),
          migrations.CreateModel(
              name='PostponementPage',
              fields=[
                  ('cancellationpage_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='joyous.cancellationpage')),
                  ('time_from', models.TimeField(blank=True, null=True, verbose_name='start time')),
                  ('time_to', models.TimeField(blank=True, null=True, verbose_name='end time')),
                  ('details', wagtail.core.fields.RichTextField(blank=True, verbose_name='details')),
                  ('location', models.CharField(blank=True, max_length=255, verbose_name='location')),
                  ('website', models.URLField(blank=True, verbose_name='website')),
                  ('num_days', models.IntegerField(default=1, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(99)], verbose_name='number of days')),
                  ('postponement_title', models.CharField(help_text='The title for the postponed event', max_length=255, verbose_name='title')),
                  ('date', models.DateField(verbose_name='date')),
                  ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='joyous.eventcategory', verbose_name='category')),
                  ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image', verbose_name='image')),
              ],
              options={
                  'verbose_name': 'postponement',
                  'verbose_name_plural': 'postponements',
                  'default_manager_name': 'objects',
              },
              bases=(wagtail.contrib.routable_page.models.RoutablePageMixin, 'joyous.cancellationpage', models.Model),
          ),
          migrations.CreateModel(
              name='ClosedFor',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=100, verbose_name='name')),
                  ('page', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='closed_for', to='joyous.closedforholidayspage')),
              ],
              options={
                  'ordering': ['pk'],
                  'unique_together': {('page', 'name')},
              },
          ),
          migrations.CreateModel(
              name='RescheduleMultidayEventPage',
              fields=[
              ],
              options={
                  'verbose_name': 'postponement',
                  'verbose_name_plural': 'postponements',
                  'proxy': True,
                  'indexes': [],
                  'constraints': [],
              },
              bases=(ls.joyous.utils.mixins.ProxyPageMixin, 'joyous.postponementpage'),
          ),
      ]
  