Skip to content

Commit

Permalink
events: Add boolean field "external" to Event
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Apr 21, 2021
1 parent c3cbe28 commit dfa0a20
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mpicms/events/migrations/0015_event_external.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.1.7 on 2021-03-21 11:49

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('events', '0014_auto_20210114_1926'),
]

operations = [
migrations.AddField(
model_name='event',
name='external',
field=models.BooleanField(default=False),
),
]
2 changes: 2 additions & 0 deletions mpicms/events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Event(BodyMixin, BasePage):
start_time = models.TimeField(_('start time'), blank=True, null=True)
end_time = models.TimeField(_('end time'), blank=True, null=True)
room = models.CharField(_('Room'), max_length=10, blank=True)
external = models.BooleanField(default=False)

header_image = models.ForeignKey(
'wagtailimages.Image',
Expand All @@ -36,6 +37,7 @@ class Event(BodyMixin, BasePage):
ImageChooserPanel('header_image'),
MultiFieldPanel(
[
FieldPanel('external'),
FieldPanel('start_date'),
FieldPanel('start_time'),
FieldPanel('end_date'),
Expand Down

0 comments on commit dfa0a20

Please sign in to comment.