From: Charles Connell Date: Fri, 10 Jan 2014 21:42:29 +0000 (-0500) Subject: Always create a new course when using Course form #267 X-Git-Tag: release-20150131~281 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c34e051425420e2d25786ce31b6519309b212fdc;p=oweals%2Fkarmaworld.git Always create a new course when using Course form #267 --- 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