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 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_context_data(**kwargs)
> ```
> In the template I used {{ second_form }}. However it's not showing up.
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1f36d906-99d4-4e90-afb0-659d99e6fa92n%40googlegroups.com.


Re: Images

2022-05-08 Thread Arshad Noman
First, you change the picture name and place it in the pictures folder like
static or media folder then change the picture name in templates where you
want the picture to be displayed


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sun, 8 May 2022 at 03:37, Aliya Janmohamed 
wrote:

> Hello,
>
> I cannot load my images, this is what shows:
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2dc9f275-adcf-4a03-b8ed-db4aad8dfbc6n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B0oV2hu4SW1VJc0H%3DEfCnBsXLts0K8y_T_C-jjdpE5754r90g%40mail.gmail.com.