Always create a new course when using Course form #267
authorCharles Connell <charles@connells.org>
Fri, 10 Jan 2014 21:42:29 +0000 (16:42 -0500)
committerCharles Connell <charles@connells.org>
Fri, 10 Jan 2014 21:43:01 +0000 (16:43 -0500)
karmaworld/apps/courses/views.py

index 657d7565375be9658354f319d009b169a9ff5ca4..23d62bfff2c1a06883005e39f8846525a9144c71 100644 (file)
@@ -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