From c34e051425420e2d25786ce31b6519309b212fdc Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Fri, 10 Jan 2014 16:42:29 -0500 Subject: [PATCH] Always create a new course when using Course form #267 --- karmaworld/apps/courses/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/karmaworld/apps/courses/views.py b/karmaworld/apps/courses/views.py index 657d756..23d62bf 100644 --- a/karmaworld/apps/courses/views.py +++ b/karmaworld/apps/courses/views.py @@ -25,7 +25,7 @@ class CourseListView(ListView, ModelFormMixin, ProcessFormView): """ Simple ListView for the front page that includes the CourseForm """ model = Course form_class = CourseForm - object = Course() + object = None def get_context_data(self, **kwargs): """ Add the CourseForm to ListView context """ @@ -59,7 +59,6 @@ class CourseListView(ListView, ModelFormMixin, ProcessFormView): return self.render_to_response(self.get_context_data(**kwargs)) - class CourseDetailView(DetailView): """ Class-based view for the course html page """ model = Course -- 2.25.1