From b60d8fb9a85e129bbbad62dbff9f6bb494c62cb4 Mon Sep 17 00:00:00 2001 From: Stephan Telling Date: Sat, 15 Jul 2017 15:56:32 +0200 Subject: [PATCH] fix #135 --- .../migrations/0042_auto_20170715_1547.py | 25 +++++++++++++++++++ src/program/models.py | 10 ++++++++ src/program/views.py | 9 +++---- 3 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 src/program/migrations/0042_auto_20170715_1547.py diff --git a/src/program/migrations/0042_auto_20170715_1547.py b/src/program/migrations/0042_auto_20170715_1547.py new file mode 100644 index 00000000..006413d0 --- /dev/null +++ b/src/program/migrations/0042_auto_20170715_1547.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-07-15 13:47 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('program', '0041_auto_20170711_2248'), + ] + + operations = [ + migrations.AddField( + model_name='eventproposal', + name='submission_notes', + field=models.TextField(blank=True, help_text='Private notes for the event. Only visible to the submitting user and the BornHack organisers.'), + ), + migrations.AddField( + model_name='speakerproposal', + name='submission_notes', + field=models.TextField(blank=True, help_text='Private notes for the event. Only visible to the submitting user and the BornHack organisers.'), + ), + ] diff --git a/src/program/models.py b/src/program/models.py index eb2b6fa8..a89197ee 100644 --- a/src/program/models.py +++ b/src/program/models.py @@ -184,6 +184,11 @@ class SpeakerProposal(UserSubmittedModel): max_length=255 ) + submission_notes = models.TextField( + help_text='Private notes for the event. Only visible to the submitting user and the BornHack organisers.', + blank=True + ) + @property def headline(self): return self.name @@ -245,6 +250,11 @@ class EventProposal(UserSubmittedModel): help_text='If we can video record the event or not' ) + submission_notes = models.TextField( + help_text='Private notes for the event. Only visible to the submitting user and the BornHack organisers.', + blank=True + ) + @property def headline(self): return self.title diff --git a/src/program/views.py b/src/program/views.py index 523e6b43..084607d0 100644 --- a/src/program/views.py +++ b/src/program/views.py @@ -28,7 +28,6 @@ from .email import ( add_eventproposal_updated_email ) from . import models -import logging logger = logging.getLogger("bornhack.%s" % __name__) @@ -91,7 +90,7 @@ class ProposalListView(LoginRequiredMixin, CampViewMixin, ListView): class SpeakerProposalCreateView(LoginRequiredMixin, CampViewMixin, CreateProposalMixin, EnsureWritableCampMixin, EnsureCFSOpenMixin, CreateView): model = models.SpeakerProposal - fields = ['name', 'biography', 'picture_small', 'picture_large'] + fields = ['name', 'biography', 'picture_small', 'picture_large', 'submission_notes'] template_name = 'speakerproposal_form.html' def get_success_url(self): @@ -100,7 +99,7 @@ class SpeakerProposalCreateView(LoginRequiredMixin, CampViewMixin, CreateProposa class SpeakerProposalUpdateView(LoginRequiredMixin, CampViewMixin, EnsureUserOwnsProposalMixin, EnsureWritableCampMixin, EnsureCFSOpenMixin, UpdateView): model = models.SpeakerProposal - fields = ['name', 'biography', 'picture_small', 'picture_large'] + fields = ['name', 'biography', 'picture_small', 'picture_large', 'submission_notes'] template_name = 'speakerproposal_form.html' def get_success_url(self): @@ -162,7 +161,7 @@ class SpeakerProposalPictureView(LoginRequiredMixin, CampViewMixin, EnsureUserOw class EventProposalCreateView(LoginRequiredMixin, CampViewMixin, CreateProposalMixin, EnsureWritableCampMixin, EnsureCFSOpenMixin, CreateView): model = models.EventProposal - fields = ['title', 'abstract', 'event_type', 'speakers', 'allow_video_recording'] + fields = ['title', 'abstract', 'event_type', 'speakers', 'allow_video_recording', 'submission_notes'] template_name = 'eventproposal_form.html' def get_context_data(self, **kwargs): @@ -174,7 +173,7 @@ class EventProposalCreateView(LoginRequiredMixin, CampViewMixin, CreateProposalM class EventProposalUpdateView(LoginRequiredMixin, CampViewMixin, EnsureUserOwnsProposalMixin, EnsureWritableCampMixin, EnsureCFSOpenMixin, UpdateView): model = models.EventProposal - fields = ['title', 'abstract', 'event_type', 'speakers'] + fields = ['title', 'abstract', 'event_type', 'speakers', 'submission_notes'] template_name = 'eventproposal_form.html' def get_success_url(self):