add field to allow video recording on event proposal
This commit is contained in:
parent
aa29480498
commit
6744ee1959
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.5 on 2017-07-09 19:12
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('program', '0039_auto_20170430_1408'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='eventproposal',
|
||||
name='allow_video_recording',
|
||||
field=models.BooleanField(default=False, help_text='If we can video record the event or not'),
|
||||
),
|
||||
]
|
|
@ -230,6 +230,11 @@ class EventProposal(UserSubmittedModel):
|
|||
help_text='Pick the speaker(s) for this event',
|
||||
)
|
||||
|
||||
allow_video_recording = models.BooleanField(
|
||||
default=False,
|
||||
help_text='If we can video record the event or not'
|
||||
)
|
||||
|
||||
@property
|
||||
def headline(self):
|
||||
return self.title
|
||||
|
@ -249,6 +254,7 @@ class EventProposal(UserSubmittedModel):
|
|||
event.abstract = self.abstract
|
||||
event.event_type = self.event_type
|
||||
event.proposal = self
|
||||
event.video_recording = self.video_recording
|
||||
event.save()
|
||||
# loop through the speakerproposals linked to this eventproposal and associate any related speaker objects with this event
|
||||
for sp in self.speakers.all():
|
||||
|
|
|
@ -139,7 +139,7 @@ class SpeakerProposalPictureView(LoginRequiredMixin, CampViewMixin, EnsureUserOw
|
|||
|
||||
class EventProposalCreateView(LoginRequiredMixin, CampViewMixin, CreateProposalMixin, EnsureWritableCampMixin, EnsureCFSOpenMixin, CreateView):
|
||||
model = models.EventProposal
|
||||
fields = ['title', 'abstract', 'event_type', 'speakers']
|
||||
fields = ['title', 'abstract', 'event_type', 'speakers', 'allow_video_recording']
|
||||
template_name = 'eventproposal_form.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
|
|
Loading…
Reference in a new issue