From 7d13d652b741bee7390c39d6e27f4e6f9d909442 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 16 Apr 2020 15:02:40 +0100 Subject: removed CAFCreate form view and template - we're not doing that outside admin --- ctrack/caf/views.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'ctrack/caf/views.py') diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py index 7e5e510..c33b2d1 100644 --- a/ctrack/caf/views.py +++ b/ctrack/caf/views.py @@ -3,26 +3,15 @@ from django.shortcuts import render from django.views.generic import CreateView, ListView, DetailView from ctrack.assessments.models import CAFAssessment, CAFObjective, CAFPrinciple, CAFAssessmentOutcomeScore -from ctrack.caf.forms import CAFCreateForm from ctrack.caf.models import ApplicableSystem, CAF -class CreateCAF(LoginRequiredMixin, CreateView): - form_class = CAFCreateForm - template_name = "caf/caf_create.html" - - def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) - context['form'] = self.form_class - return context - - -class ListCAF(LoginRequiredMixin, ListView): - pass - - -# class DetailCAF(LoginRequiredMixin, DetailView): +# class ListCAF(LoginRequiredMixin, ListView): # model = CAF +# paginate_by = 20 + +# def get_context_data(self, **kwargs): +# return super().get_context_data(**kwargs) # Let's write a traditional function view! def caf_detail_view(request, pk): -- cgit v1.2.3