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
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
2 matches
Mail list logo