diff --git a/src/program/mixins.py b/src/program/mixins.py index 87fb9cda..6bf9e8c1 100644 --- a/src/program/mixins.py +++ b/src/program/mixins.py @@ -5,7 +5,7 @@ from . import models from django.contrib import messages -class CreateUserProposalMixin(SingleObjectMixin): +class CreateProposalMixin(SingleObjectMixin): def form_valid(self, form): # set camp and user before saving form.instance.camp = self.camp diff --git a/src/program/views.py b/src/program/views.py index cd63aad7..a1554ac0 100644 --- a/src/program/views.py +++ b/src/program/views.py @@ -9,7 +9,7 @@ from django.contrib import messages from django.shortcuts import redirect from django.urls import reverse from camps.mixins import CampViewMixin -from .mixins import CreateUserProposalMixin, EnsureUnpprovedProposalMixin, EnsureUserOwnsProposalMixin, EnsureWritableCampMixin +from .mixins import CreateProposalMixin, EnsureUnpprovedProposalMixin, EnsureUserOwnsProposalMixin, EnsureWritableCampMixin from . import models import datetime, os @@ -33,7 +33,7 @@ class ProposalListView(LoginRequiredMixin, CampViewMixin, ListView): return context -class SpeakerProposalCreateView(LoginRequiredMixin, CampViewMixin, CreateUserProposalMixin, EnsureWritableCampMixin, CreateView): +class SpeakerProposalCreateView(LoginRequiredMixin, CampViewMixin, CreateProposalMixin, EnsureWritableCampMixin, CreateView): model = models.SpeakerProposal fields = ['name', 'biography', 'picture_small', 'picture_large'] template_name = 'speakerproposal_form.html' @@ -89,7 +89,7 @@ class SpeakerProposalPictureView(LoginRequiredMixin, CampViewMixin, EnsureUserOw return response -class EventProposalCreateView(LoginRequiredMixin, CampViewMixin, CreateUserProposalMixin, EnsureWritableCampMixin, CreateView): +class EventProposalCreateView(LoginRequiredMixin, CampViewMixin, CreateProposalMixin, EnsureWritableCampMixin, CreateView): model = models.EventProposal fields = ['title', 'abstract', 'event_type', 'speakers'] template_name = 'eventproposal_form.html'