Re: double forms

2022-05-08 Thread Aditya Priyadarshi
Write the get_context_data like this ``` def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['second_form'] = self.second_form return context ``` On Friday, 6 May 2022 at 21:42:07 UTC+5:30 andycod...@gmail.com wrote: > Hi I'm trying to put two for

double forms

2022-05-06 Thread Andy Li
Hi I'm trying to put two forms, here is my code: ``` class FrontView(LoginRequiredMixin, UserPassesTestMixin, FormView): template_name = "template.html" form_class = FirstForm coupon_form = SecondForm def get_context_data(self, **kwargs): kwargs['second_form'] = self.second_form return super().get