- def get_form(self, form_class):
- if self.request.method == 'POST':
- return form_class(self.object, self.request.POST)
- else:
- return form_class(self.object)
+ def get_form(self, form_class=OrderForm):
+ return form_class(self.object, self.request.POST)