def get_context_data(self, **kwargs): ctx = super(QuotationDetailView, self).get_context_data(**kwargs) form_class = forms.quotationitem_form_factory( with_price=self.object.disaggregated ) ctx.update({ 'form': form_class(initial={'quotation': self.object, }), }) return ctx
def get_form_class(self): return forms.quotationitem_form_factory( with_price=self.object.quotation.disaggregated )
def get_form_class(self): return forms.quotationitem_form_factory()